From 0ed80c59846e9e1b23d26869f05f109dac7495c5 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 15 May 2018 10:56:23 +0100 Subject: 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 --- xci/installer/kubespray/playbooks/configure-opnfvhost.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'xci/installer/kubespray/playbooks/configure-opnfvhost.yml') 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 -- cgit 1.2.3-korg