From 4ac18d220037133c81fcf139a92a381dadd8defd Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Thu, 15 Dec 2016 01:21:26 +0000 Subject: [PATCH] If a host has no specific hosts file in ansible, make it an empty one Signed-off-by: Patrick Uiterwijk --- roles/hosts/files/base | 2 ++ roles/hosts/tasks/main.yml | 1 + 2 files changed, 3 insertions(+) create mode 100644 roles/hosts/files/base diff --git a/roles/hosts/files/base b/roles/hosts/files/base new file mode 100644 index 0000000000..849c10d456 --- /dev/null +++ b/roles/hosts/files/base @@ -0,0 +1,2 @@ +127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 diff --git a/roles/hosts/tasks/main.yml b/roles/hosts/tasks/main.yml index 2d2843f750..36d382f452 100644 --- a/roles/hosts/tasks/main.yml +++ b/roles/hosts/tasks/main.yml @@ -18,6 +18,7 @@ - "{{ host_group }}-hosts" - "{{ ansible_domain }}-hosts" - "{{ datacenter }}-hosts" + - "base" skip: true tags: - config