From a4e91199e71aafff55120ebb9ebef1826d741db8 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorek
Date: Fri, 29 Jan 2021 14:19:40 +0100
Subject: Create cluster operator access information
Issue-ID: INT-1601
Change-Id: I218ec5521d97eab298ea0556f690f2bc3d8ccbfa
Signed-off-by: Pawel Wieczorek
---
deployment/noheat/infra-openstack/ansible/create.yml | 10 ++++++++++
1 file changed, 10 insertions(+)
(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 6adcf5f65..5b9542195 100644
--- a/deployment/noheat/infra-openstack/ansible/create.yml
+++ b/deployment/noheat/infra-openstack/ansible/create.yml
@@ -28,3 +28,13 @@
- role: openstack/create_devstack_hosts
hosts: "{{ cluster.hosts }}"
operator_key: "{{ hostvars['operator0']['key']['public_key'] }}"
+- name: Create cluster operator access information
+ hosts: "operator0"
+ gather_facts: False
+ tasks:
+ - name: Add cluster hostnames to /etc/hosts file
+ lineinfile:
+ path: /etc/hosts
+ line: "{{ item.value + ' ' + item.key }}"
+ become: yes
+ loop: "{{ lookup('dict', hostvars['localhost']['hosts_dict']) }}"
--
cgit 1.2.3-korg