From 0ad5c702b4e62d3223f0c2d2c382f18a441beb8e Mon Sep 17 00:00:00 2001
From: Pawel Wieczorek
Date: Wed, 28 Apr 2021 15:08:30 +0200
Subject: Prepare operation machine for in-cluster deployment stage
This patch creates an in-cluster inventory based on the dynamic one from
creating OpenStack VMs. It will be used at the next deployment stage.
This patch also adds missing documentation on required software to run
these Ansible playbooks.
Issue-ID: INT-1601
Change-Id: Ibf009a2530de989b1927a7a4a2f328fa61c1dd55
Signed-off-by: Pawel Wieczorek
---
deployment/noheat/infra-openstack/ansible/create.yml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
(limited to 'deployment/noheat/infra-openstack/ansible/create.yml')
diff --git a/deployment/noheat/infra-openstack/ansible/create.yml b/deployment/noheat/infra-openstack/ansible/create.yml
index 69ecd1dd9..a088662b2 100644
--- a/deployment/noheat/infra-openstack/ansible/create.yml
+++ b/deployment/noheat/infra-openstack/ansible/create.yml
@@ -30,7 +30,9 @@
operator_key: "{{ hostvars['operator0']['key']['public_key'] }}"
- name: Create cluster operator access information
hosts: "operator0"
- gather_facts: False
+ roles:
+ - role: geerlingguy.ansible
+ become: yes
tasks:
- name: Add cluster hostnames to /etc/hosts file
lineinfile:
@@ -38,3 +40,9 @@
line: "{{ item.value + ' ' + item.key }}"
become: yes
loop: "{{ lookup('dict', hostvars['localhost']['hosts_dict']) }}"
+ - name: Create inventory for in-cluster deployment stage
+ template:
+ src: templates/inventory.ini.j2
+ dest: "{{ operation.inventory }}"
+ vars:
+ hosts: "{{ lookup('dict', hostvars['localhost']['hosts_dict']) }}"
--
cgit 1.2.3-korg