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.

Change-Id: I836ab1a23c8aea35c0cea54d0765c7313a4b9038
Closes-Bug: 1861782
(cherry picked from commit 96c40f89be)
This commit is contained in:
Cédric Jeanneret 2020-02-04 09:40:28 +01:00 committed by Cédric Jeanneret (Tengu)
parent 69c07ca809
commit 8b8194b171
1 changed files with 8 additions and 11 deletions

View File

@ -433,7 +433,7 @@ outputs:
deploy_target_host: "DEPLOY_TARGET_HOST"
- hosts: all
name: Manage SELinux
name: Manage SELinux and generate /etc/hosts
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
any_errors_fatal: yes
tasks:
@ -441,6 +441,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
@ -607,16 +614,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