diff --git a/tasks/install.yml b/tasks/install.yml index 03fca6f..34cc6c2 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -54,4 +54,7 @@ src: "templates/etc/resolv.conf.j2" dest: "/mnt/etc/resolv.conf" - name: "Set hostname." - shell: "echo {{ inventory_hostname }} > /etc/hostname" + template: + src: "templates/etc/hostname.j2" + dest: "/mnt/etc/hostname" + mode: "644"