diff options
author | Markos Chandras <mchandras@suse.de> | 2018-05-15 10:56:23 +0100 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-05-16 14:46:00 +0100 |
commit | 0ed80c59846e9e1b23d26869f05f109dac7495c5 (patch) | |
tree | ff57633e68f9a557bd69a4b2ba3327e10e91635f /xci/installer/kubespray/playbooks | |
parent | 8dc9f3a0d2c4db3bd9720966043dda0d2d4431bb (diff) |
xci: kubespray: Switch kubespray to dynamic inventory
The kubespray installer contains one inventory per flavor. We can get
rid of these files and use the dynamic inventory similar to OSA.
Moreover, we extend the dynamic inventory to read additional group
variables per flavor if necessary. This way we can still pass additional
information to inventory on per-flavor basis. This also fixes a typo
in the 'IDF' file. We also need to bump Ansible for kubespray since the
version we were using is having troubles with dynamic inventories.
Change-Id: Ic58101555f81aec5fee3c193608440aa89bbe445
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/installer/kubespray/playbooks')
-rw-r--r-- | xci/installer/kubespray/playbooks/configure-opnfvhost.yml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml index 01904ba3..7141f512 100644 --- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml +++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml @@ -34,16 +34,18 @@ file: path: "{{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory" state: absent - - name: copy kubespray inventory directory - command: "cp -rf {{ remote_xci_flavor_files }}/inventory \ - {{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory" - args: - creates: "{{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory" + - name: make sure kubespray/opnfv_inventory/group_vars/ exist file: path: "{{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory/group_vars" state: directory + - name: copy kubespray inventory directory + file: + src: "{{ remote_xci_playbooks }}/dynamic_inventory.py" + path: "{{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory/dynamic_inventory.py" + state: link + - name: Reload XCI deployment host facts setup: filter: ansible_local |