Переглянути джерело

Generate the /etc/hosts content once.

This resolves a performance penalty of rendering many
hosts files for large deployments. Since they should
all match, we now generate the hosts block once and then
push it out to all of the nodes.

Change-Id: Iff6db6a520b9ff7fbb737a1ddb69c66cc2008ea7
Closes-Bug: #1860146
Signed-off-by: Luke Short <ekultails@gmail.com>
(cherry picked from commit dac34d302c)
tags/0.5.0
Luke Short 4 місяці тому
джерело
коміт
213072ca63
1 змінених файлів з 13 додано та 6 видалено
  1. +13
    -6
      tripleo_ansible/roles/tripleo-hosts-entries/tasks/main.yml

+ 13
- 6
tripleo_ansible/roles/tripleo-hosts-entries/tasks/main.yml Переглянути файл

@@ -27,12 +27,10 @@
tags:
- tripleo_hosts_entries

- name: Update /etc/hosts
become: true
blockinfile:
create: true
path: "{{ tripleo_hosts_entries_hosts_path }}"
block: |
- name: Render out the hosts entries
run_once: true
set_fact:
tripleo_hosts_entries_block: |
{{ tripleo_hosts_entries_undercloud_hosts_entries | join('') }}

{{ tripleo_hosts_entries_vip_hosts_entries | join('') }}
@@ -55,3 +53,12 @@
{{ tripleo_hosts_entries_extra_hosts_entries | join('') }}
tags:
- tripleo_hosts_entries

- name: Update /etc/hosts
become: true
blockinfile:
create: true
path: "{{ tripleo_hosts_entries_hosts_path }}"
block: "{{ tripleo_hosts_entries_block }}"
tags:
- tripleo_hosts_entries

Завантаження…
Відмінити
Зберегти