Generate inventory from PDF and IDF

This change enables the generation of Ansible inventory by
processing information from PDF & IDF for the nodes provisioned
with bifrost. The inventory generation is moved to the provisioner
instead of the installer as we can disconnect dependency to provisioner
once we generate the ansible inventory for kubespray. This is important
for enabling other provisioners as they have no relation to each other
but they just provision the nodes and record the inventory for them.

The IP which Kubespray operates on is also specified in generated
inventory.

The IP which Kubespray will operate on is specified in generated
inventory. The IP belongs to the interface that is connected to
public network by default. The IP is then extracted from PDF file
using the index of the interface specified under the net_config
section in IDF.

If for some reason a different IP needs to be used, the network
which the interface is connected to must be specified in IDF with
key kubespray_network similar to how pxe_network is specified.
The generated inventory will then contain that IP instead of the
default one.

Change-Id: I3e97013d11d5451f614e2389c95dc7ae2ca5e599
diff --git a/playbooks/generate-inventory.yml b/playbooks/generate-inventory.yml
new file mode 100644
index 0000000..fa9b24a
--- /dev/null
+++ b/playbooks/generate-inventory.yml
@@ -0,0 +1,32 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- hosts: localhost
+  connection: local
+  gather_facts: true
+  vars_files:
+    - "{{ engine_path }}/engine/var/versions.yml"
+    - "{{ engine_path }}/engine/var/global.yml"
+    - "{{ pdf_file }}"
+    - "{{ idf_file }}"
+
+  roles:
+    - role: generate-inventory
+
+# vim: set ts=2 sw=2 expandtab: