Use inventory_hostname_short
This commit is contained in:
parent
2f93186906
commit
9af8e490a3
2 changed files with 3 additions and 3 deletions
|
@ -20,9 +20,9 @@
|
|||
line: "{{ item.ip }} {{ item.hosts }}"
|
||||
with_items:
|
||||
- ip: "127.0.0.1"
|
||||
hosts: "{{ inventory_hostname }} {{ inventory_hostname.split('.')[0] }} localhost localhost.localdomain"
|
||||
hosts: "{{ inventory_hostname }} {{ inventory_hostname_short }} localhost localhost.localdomain"
|
||||
- ip: "::1"
|
||||
hosts: "{{ inventory_hostname }} {{ inventory_hostname.split('.')[0] }} localhost localhost.localdomain"
|
||||
hosts: "{{ inventory_hostname }} {{ inventory_hostname_short }} localhost localhost.localdomain"
|
||||
|
||||
- import_tasks: "pkg_Alpine.yml"
|
||||
when: ansible_distribution == 'Alpine'
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{ inventory_hostname.split(".")[0] }}
|
||||
{{ inventory_hostname_short }}
|
Loading…
Add table
Add a link
Reference in a new issue