summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
diff options
context:
space:
mode:
authorhu xinhui <xinhui_hu@foxmail.com>2017-09-29 17:06:33 +0800
committerJustin chi <chigang@huawei.com>2017-10-16 01:47:13 +0000
commit1a1f792afdb66343645a3703f4fccb65ba3c11d1 (patch)
tree8a2750d18690174100ff24697d39b05e2545ba01 /deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
parentcb85c6c9a6a5eb1d492cddd44a6bcf876a3176a5 (diff)
Modification for kargo to generate dynamic inventory
JIRA: - There is some hardcode for kargo inventory.This patch is to generate dynamic inventory for kargo Change-Id: If4a7c5f973e520e4ca24c3c9e0bfa97725a5a44c Signed-off-by: hu xinhui <xinhui_hu@foxmail.com> (cherry picked from commit 179cd6db9f1bd9be1606187cf74e128bede7a8e6)
Diffstat (limited to 'deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml')
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
index 4e902606..d3dcb878 100644
--- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
@@ -58,11 +58,18 @@
tags:
- ansible
+- name: copy inventoriy.json file
+ copy:
+ src: /var/ansible/run/kubernetes-opnfv2/inventories/inventory.json
+ dest: /tmp/inventory.json
+ tags:
+ - ansible
+
- name: generate kargo inventories
shell: >
python /tmp/generate_inventories.py \
"/opt/kargo_k8s/inventory/inventory.cfg" \
- "{{ ip_settings | to_json }}"
+ "/tmp/inventory.json"
tags:
- ansible