Browse Source

roles/dns_record: use full fqdn in hosts file

python3
Zolfa 5 years ago
parent
commit
b478954cb6
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      roles/dns_record/tasks/main.yaml

+ 2
- 2
roles/dns_record/tasks/main.yaml View File

@ -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


Loading…
Cancel
Save