main.yml 296 B

12345678
  1. ---
  2. # tasks file for ffdo.hostname
  3. - name: Ensure hostname is set
  4. hostname: name={{ inventory_hostname_short }}
  5. - name: Ensure /etc/hosts entry for hostname exists
  6. lineinfile: dest=/etc/hosts regexp="^127\\.0\\.1\\.1" line="127.0.1.1 {{ inventory_hostname }} {{ inventory_hostname_short }}"