Initial commit

This commit is contained in:
nd 2017-11-15 00:24:29 +01:00
commit bd5282ad87
3 changed files with 31 additions and 0 deletions

20
tasks/main.yml Normal file
View file

@ -0,0 +1,20 @@
- name: install dbus (needed to set the hostname with systemd)
apt:
pkg: dbus
when: rootpath == ""
- name: set hostname with systemd
hostname:
name: "{{ inventory_hostname }}"
when: rootpath == ""
- name: customize vm image hostname
copy:
dest: "{{ rootpath }}/etc/hostname"
content: '{{ inventory_hostname_short }}'
- name: customize vm image hosts file
template:
src: hosts.j2
dest: "{{ rootpath }}/etc/hosts"