From d116b82ad624dcc62a0de212a66e17b4d62269c7 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 12 Dec 2014 19:06:11 +0100 Subject: Cannot use yaml in a string in a yaml document, so use a external file instead --- roles/base/files/06_preserve_hostname.cfg | 1 + roles/base/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 roles/base/files/06_preserve_hostname.cfg (limited to 'roles') diff --git a/roles/base/files/06_preserve_hostname.cfg b/roles/base/files/06_preserve_hostname.cfg new file mode 100644 index 0000000..64330c7 --- /dev/null +++ b/roles/base/files/06_preserve_hostname.cfg @@ -0,0 +1 @@ +preserve_hostname: true diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index ccc0a13..7fb59ac 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -13,7 +13,7 @@ - service: name=chronyd state=running enabled=yes -- copy: dest=/etc/cloud/cloud.cfg.d/06_preserve_hostname.cfg content='preserve_hostname: true' +- copy: dest=/etc/cloud/cloud.cfg.d/06_preserve_hostname.cfg src=06_preserve_hostname.cfg - name: install firewalld on centos7 yum: pkg=firewalld state=installed -- cgit