Add prefix

This commit is contained in:
2021-09-30 23:26:52 +13:00
parent 1f3310fe96
commit d2158ba3fa

View File

@@ -36,7 +36,7 @@
line: "::1 localhost {{ inventory_hostname }}"
}
- {regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_default_ipv4.address.split('.')[-1] }}$",
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}"
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ common_domain }} {{ inventory_hostname }}"
}
- {regexp: "^127.0.0.1.+{{ ansible_nodename.split('.')[0] }}$",
line: "127.0.0.1 localhost {{ inventory_hostname }}"
@@ -45,7 +45,7 @@
line: "::1 localhost {{ inventory_hostname }}"
}
- {regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_nodename.split('.')[0] }}$",
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}"
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ common_domain }} {{ inventory_hostname }}"
}
when:
- ansible_virtualization_type != "docker"