20 lines
418 B
YAML
20 lines
418 B
YAML
- name: Make sure dbus is installed
|
|
apt: name=dbus state=present
|
|
become: true
|
|
|
|
- name: Set the correct hostname
|
|
hostname: name='{{ inventory_hostname }}'
|
|
notify:
|
|
- restart server
|
|
- wait for restart
|
|
become: true
|
|
|
|
- name: Update the /etc/hosts file
|
|
lineinfile:
|
|
dest: /etc/hosts
|
|
regexp: '^127.0.1.1'
|
|
line: "127.0.1.1 {{ inventory_hostname }}"
|
|
state: present
|
|
backup: yes
|
|
become: true
|