From e7f33a931185c1c4b6af4203cb5658892284a9a3 Mon Sep 17 00:00:00 2001 From: f Date: Sun, 19 Jun 2022 14:55:05 -0300 Subject: [PATCH] set hostname correctly --- tasks/install.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"