From 724da23104e9ae9da4d8b2588780d18ca8526b59 Mon Sep 17 00:00:00 2001 From: Luke Short Date: Fri, 7 Feb 2020 10:51:11 -0500 Subject: [PATCH] Insert hosts entries to the beginning of the file. This ensures that the first host entry found for a host will use what is generated by TripleO (if applicable). Change-Id: I3a4883bc0c8dfa480ce5fd10ec40f3a9f0cff217 Closes-Bug: #1861035 Signed-off-by: Luke Short (cherry picked from commit 76fd2eaacc202ab5681d23596ed0f3d25216bb9f) --- tripleo_ansible/roles/tripleo-hosts-entries/tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tripleo_ansible/roles/tripleo-hosts-entries/tasks/main.yml b/tripleo_ansible/roles/tripleo-hosts-entries/tasks/main.yml index 99696fb0b..4209f3143 100644 --- a/tripleo_ansible/roles/tripleo-hosts-entries/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo-hosts-entries/tasks/main.yml @@ -62,6 +62,8 @@ blockinfile: create: true path: "{{ tripleo_hosts_entries_hosts_path }}" + # BOF denotes the beginning of the file. + insertbefore: BOF block: "{{ tripleo_hosts_entries_block }}" tags: - tripleo_hosts_entries