--- a/playbook-example.yml Tue Mar 29 21:29:27 2016 +0000
+++ b/playbook-example.yml Fri Apr 01 01:55:45 2016 +0800
# records for hg.mydomain or add it to /etc/hosts.
hostname: name={{ hostname }}
- - name: Update /etc/hostname
- shell: echo '{{ hostname }}' > /etc/hostname
- name: Update /etc/hosts
shell: echo '127.0.0.1 {{ hostname }}' >> /etc/hosts