Use inventory_hostname_short (#20054)

When using AWS we have to use the full domain name in the inventory file, which
we rather than the short name. This change avoids that ending up being
set in the tests.
This commit is contained in:
John R Barker 2017-01-09 17:21:04 +00:00 committed by GitHub
commit fb3bef7f46
62 changed files with 123 additions and 123 deletions

View file

@ -14,7 +14,7 @@
- name: collect any backup files
find:
paths: "{{ role_path }}/backup"
pattern: "{{ inventory_hostname }}_config*"
pattern: "{{ inventory_hostname_short }}_config*"
register: backup_files
delegate_to: localhost
@ -39,7 +39,7 @@
- name: collect any backup files
find:
paths: "{{ role_path }}/backup"
pattern: "{{ inventory_hostname }}_config*"
pattern: "{{ inventory_hostname_short }}_config*"
register: backup_files
delegate_to: localhost

View file

@ -3,7 +3,7 @@
- name: setup
ios_config:
lines: ['hostname {{ inventory_hostname }}']
lines: ['hostname {{ inventory_hostname_short }}']
provider: "{{ cli }}"
match: none
@ -30,7 +30,7 @@
- name: teardown
ios_config:
lines: ['hostname {{ inventory_hostname }}']
lines: ['hostname {{ inventory_hostname_short }}']
provider: "{{ cli }}"
match: none

View file

@ -5,7 +5,7 @@
ios_config:
lines:
- "snmp-server contact ansible"
- "hostname {{ inventory_hostname }}"
- "hostname {{ inventory_hostname_short }}"
provider: "{{ cli }}"
match: none
@ -37,7 +37,7 @@
ios_config:
lines:
- "no snmp-server contact"
- "hostname {{ inventory_hostname }}"
- "hostname {{ inventory_hostname_short }}"
provider: "{{ cli }}"
match: none

View file

@ -5,7 +5,7 @@
ios_config:
lines:
- "snmp-server contact ansible"
- "hostname {{ inventory_hostname }}"
- "hostname {{ inventory_hostname_short }}"
provider: "{{ cli }}"
match: none
@ -37,7 +37,7 @@
ios_config:
lines:
- "no snmp-server contact"
- "hostname {{ inventory_hostname }}"
- "hostname {{ inventory_hostname_short }}"
provider: "{{ cli }}"
match: none

View file

@ -3,7 +3,7 @@
- name: setup
ios_config:
lines: ['hostname {{ inventory_hostname }}']
lines: ['hostname {{ inventory_hostname_short }}']
provider: "{{ cli }}"
match: none
@ -32,7 +32,7 @@
- name: teardown
ios_config:
lines: ['hostname {{ inventory_hostname }}']
lines: ['hostname {{ inventory_hostname_short }}']
provider: "{{ cli }}"
match: none