From 96c40f89beb80de611a4ea75f28b8b43007d0ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Tue, 4 Feb 2020 09:40:28 +0100 Subject: [PATCH] Generate /etc/hosts early on both under and overcloud Prior to this patch, the /etc/hosts was generated only on the overcloud nodes, leading to some issues when it comes to TLS-Everywhere, as raised in associated bug. Depends-On: https://review.opendev.org/706242 Change-Id: I836ab1a23c8aea35c0cea54d0765c7313a4b9038 Closes-Bug: 1861782 --- common/deploy-steps.j2 | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 7d46d6d409..269ba4b8da 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -482,7 +482,7 @@ outputs: - facts - hosts: all - name: Manage SELinux + name: Manage SELinux and generate /etc/hosts gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }} any_errors_fatal: yes tasks: @@ -490,6 +490,13 @@ outputs: selinux: policy: targeted state: SELINUX_MODE + - name: Configure Hosts Entries + include_role: + name: tripleo_hosts_entries + vars: + tripleo_hosts_entries_undercloud_hosts_entries: {{ '"{{ ' }} undercloud_hosts_entries {{ ' }}"' }} + tripleo_hosts_entries_extra_hosts_entries: {{ '"{{ ' }} extra_hosts_entries {{ ' }}"' }} + tripleo_hosts_entries_vip_hosts_entries: {{ '"{{ ' }} vip_hosts_entries {{ ' }}"' }} - hosts: DEPLOY_TARGET_HOST name: Common roles for TripleO servers @@ -693,16 +700,6 @@ outputs: environment: artifact_urls: {{ '"{{' }} deploy_artifact_urls {{ '}}"' }} - - name: Configure Hosts Entries - include_role: - name: tripleo_hosts_entries - vars: - tripleo_hosts_entries_undercloud_hosts_entries: {{ '"{{ ' }} undercloud_hosts_entries {{ ' }}"' }} - tripleo_hosts_entries_extra_hosts_entries: {{ '"{{ ' }} extra_hosts_entries {{ ' }}"' }} - tripleo_hosts_entries_vip_hosts_entries: {{ '"{{ ' }} vip_hosts_entries {{ ' }}"' }} - tags: - - tripleo_hosts_entries - tags: - overcloud - pre_deploy_steps