mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +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:
@@ -4,14 +4,14 @@
|
||||
- name: setup
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
- delete interfaces lo0
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
- 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
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
- name: teardown
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
- delete interfaces lo0
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
- name: setup
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
- delete interfaces lo0
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
- name: teardown
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
- delete interfaces lo0
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
- name: setup
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
- delete interfaces lo0
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
- name: teardown
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
- delete interfaces lo0
|
||||
action: replace
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
Reference in New Issue
Block a user