mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
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:
@@ -11,7 +11,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
|
||||
|
||||
@@ -36,7 +36,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
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
- name: teardown
|
||||
asa_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END cli/toplevel.yaml"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
asa_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END cli/toplevel_after.yaml"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
asa_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END cli/toplevel_before.yaml"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
- name: teardown
|
||||
asa_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- debug: msg="END cli/toplevel_nonidempotent.yaml"
|
||||
|
||||
Reference in New Issue
Block a user