From a707a61906b805f92b0c32f4e2191bfd29521d47 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 27 Sep 2020 17:20:24 +0200 Subject: [PATCH] hostname: Reformatted to newer syntax allowing multiple handlers in notify --- roles/hostname/tasks/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/hostname/tasks/main.yml b/roles/hostname/tasks/main.yml index 245933e..c7532fe 100644 --- a/roles/hostname/tasks/main.yml +++ b/roles/hostname/tasks/main.yml @@ -4,20 +4,23 @@ copy: content: "{{ hostname }}\n" dest: /etc/hostname - notify: restart systemd-hostnamed + notify: + - restart systemd-hostnamed - name: Set hostname and fqdn as alias for ipv4 lineinfile: path: /etc/hosts regexp: '^127\.0\.0\.1\s' line: "127.0.0.1 {{ fqdn }} {{ hostname }} localhost *.localhost" - notify: restart systemd-hostnamed + notify: + - restart systemd-hostnamed - name: Set hostname and fqdn as alias for ipv6 lineinfile: path: /etc/hosts regexp: '^::1\s' line: "::1 {{ fqdn }} {{ hostname }} localhost *.localhost ip6-localhost ip6-loopback" - notify: restart systemd-hostnamed + notify: + - restart systemd-hostnamed - meta: flush_handlers