Commit 283d6db5 authored by Chris's avatar Chris
Browse files

Insert the hostname into /etc/hosts near the top

parent f3d7798e
......@@ -18,9 +18,10 @@
- name: Update /etc/hosts to use new hostname
dest: /etc/hosts
regexp: '^'
line: ' {{ hostname }}'
regexp: '^\s{{ hostname }}'
line: "\t{{ hostname }}"
state: present
insertafter: "^\t"
- name: Set 'ansible_hostname' fact to the new hostname
ansible_hostname: '{{ hostname }}'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment