Skip to content
Snippets Groups Projects
Commit 42e539af authored by Thomas Schneider's avatar Thomas Schneider
Browse files

basic-system/network: Use ansible_hostname instead of inventory_hostname

The latter one is not always a non-qualified name, in AStA it is a FQDN.
parent 19f0da56
No related branches found
No related tags found
1 merge request!13basic-system/network: Use ansible_hostname instead of inventory_hostname
Pipeline #2652 passed
......@@ -21,7 +21,7 @@
- name: ensure the hostname is not a fqdn
hostname:
name: "{{ inventory_hostname }}"
name: "{{ ansible_hostname }}"
when: not dns_hostname_fqdn
notify:
- gather network facts once again
......
......@@ -7,11 +7,11 @@ ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
{% for host in hosts_alternates %}
{{ host }} {{ ansible_host }} {{ inventory_hostname }}
{{ host }} {{ ansible_host }} {{ ansible_hostname }}
{% else %}
{{ ansible_default_ipv4.address }} {{ ansible_host }} {{ inventory_hostname }}
{{ ansible_default_ipv4.address }} {{ ansible_host }} {{ ansible_hostname }}
{% if 'address' in ansible_default_ipv6 %}
{{ ansible_default_ipv6.address }} {{ ansible_host }} {{ inventory_hostname }}
{{ ansible_default_ipv6.address }} {{ ansible_host }} {{ ansible_hostname }}
{% endif %}
{% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment