From 724acd512c8e7ef1c5e7840c67c335393db05ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 6 Aug 2014 10:54:49 +0200 Subject: [PATCH] use managed by ansible macro in templates --- roles/common/tasks/main.yml | 4 ++-- roles/common/templates/hosts.j2 | 2 +- roles/common/{files/locale.conf => templates/locale.conf.j2} | 2 ++ roles/common/{files/resolv.conf => templates/resolv.conf.j2} | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) rename roles/common/{files/locale.conf => templates/locale.conf.j2} (72%) rename roles/common/{files/resolv.conf => templates/resolv.conf.j2} (56%) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index a7a62a7..1255c0e 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,7 +1,7 @@ - name: resolv.conf - copy: src=resolv.conf dest=/etc/resolv.conf mode=0644 backup=yes + template: src=resolv.conf.j2 dest=/etc/resolv.conf mode=0644 backup=yes - name: locale.conf - copy: src=locale.conf dest=/etc/locale.conf mode=0644 backup=yes + template: src=locale.conf.j2 dest=/etc/locale.conf mode=0644 backup=yes - name: /etc/hosts template: src=hosts.j2 dest=/etc/hosts mode=0644 backup=yes - locale_gen: name=de_DE.UTF-8 state=present diff --git a/roles/common/templates/hosts.j2 b/roles/common/templates/hosts.j2 index b706f7e..df3223b 100644 --- a/roles/common/templates/hosts.j2 +++ b/roles/common/templates/hosts.j2 @@ -1,4 +1,4 @@ -# THIS FILE IS MANAGED BY ANSIBLE, DO NOT EDIT MANUALLY +# {{ ansible_managed }} # # /etc/hosts: static lookup table for host names # diff --git a/roles/common/files/locale.conf b/roles/common/templates/locale.conf.j2 similarity index 72% rename from roles/common/files/locale.conf rename to roles/common/templates/locale.conf.j2 index 4e706f4..5a05e6a 100644 --- a/roles/common/files/locale.conf +++ b/roles/common/templates/locale.conf.j2 @@ -1,3 +1,5 @@ +# {{ ansible_managed }} +# LANG="de_DE.UTF-8" LC_MESSAGES="en_DK.UTF-8" LC_TIME="en_DK.UTF-8" diff --git a/roles/common/files/resolv.conf b/roles/common/templates/resolv.conf.j2 similarity index 56% rename from roles/common/files/resolv.conf rename to roles/common/templates/resolv.conf.j2 index d3269a9..7e8b965 100644 --- a/roles/common/files/resolv.conf +++ b/roles/common/templates/resolv.conf.j2 @@ -1,4 +1,4 @@ -# THIS FILE IS MANAGED BY ANSIBLE, DO NOT EDIT MANUALLY +# {{ ansible_managed }} # # /etc/resolv.conf #