From b478954cb60a57edc5236986024ff6a0dd54c6a8 Mon Sep 17 00:00:00 2001 From: Zolfa Date: Sat, 16 May 2020 23:31:33 +0200 Subject: [PATCH] roles/dns_record: use full fqdn in hosts file --- roles/dns_record/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/dns_record/tasks/main.yaml b/roles/dns_record/tasks/main.yaml index ed1092c..41e862e 100644 --- a/roles/dns_record/tasks/main.yaml +++ b/roles/dns_record/tasks/main.yaml @@ -1,8 +1,8 @@ - name: lineinfile: dest: '/etc/hosts' - line: '{{ ansible_default_ipv4.address }} {{ ansible_hostname }}' - regexp: '^\s*\S* {{ ansible_hostname }}' + line: '{{ ansible_default_ipv4.address }} {{ host_fqdn }}.' + regexp: '^\s*\S* {{ host_fqdn }}.' delegate_to: gandalf register: hosts