From 0ae280bb8ce3b5264098b0870f37161d39dce6bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Sat, 31 Aug 2024 08:56:01 +0200 Subject: [PATCH] feat(hostname): support on-demand hostname setting on Chimera Linux --- roles/hostname/handlers/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/hostname/handlers/main.yml b/roles/hostname/handlers/main.yml index ff09681..d95118b 100644 --- a/roles/hostname/handlers/main.yml +++ b/roles/hostname/handlers/main.yml @@ -3,3 +3,9 @@ cmd: "hostnamectl set-hostname {{ hostname_fqdn }}" when: ansible_os_family in ["Debian"] listen: "set-hostname" + +- name: "Set hostname via hostname to avoid a reboot" + command: + cmd: "hostname {{ hostname_fqdn }}" + when: ansible_os_family in ["Chimera"] + listen: "set-hostname"