mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07: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:
parent
a2b4ad9da0
commit
fb3bef7f46
62 changed files with 123 additions and 123 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- name: configure multiple invalid command
|
||||
junos_config:
|
||||
lines:
|
||||
- 'set system host-name {{ inventory_hostname }}'
|
||||
- 'set system host-name {{ inventory_hostname_short }}'
|
||||
- 'set system foo'
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
|
|
@ -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 }}"
|
||||
register: test
|
||||
|
@ -12,7 +12,7 @@
|
|||
- name: configure multiple commands
|
||||
junos_config:
|
||||
lines:
|
||||
- 'set system host-name {{ inventory_hostname }}'
|
||||
- 'set system host-name {{ inventory_hostname_short }}'
|
||||
- 'set interfaces lo0 unit 0 family inet address 1.1.1.1/32'
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
@ -28,7 +28,7 @@
|
|||
- name: check multiple commands idempotent
|
||||
junos_config:
|
||||
lines:
|
||||
- 'set system host-name {{ inventory_hostname }}'
|
||||
- 'set system host-name {{ inventory_hostname_short }}'
|
||||
- 'set interfaces lo0 unit 0 family inet address 1.1.1.1/32'
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
@ -41,7 +41,7 @@
|
|||
- name: teardown
|
||||
junos_config:
|
||||
lines:
|
||||
- "set system host-name {{ inventory_hostname }}"
|
||||
- "set system host-name {{ inventory_hostname_short }}"
|
||||
- "delete interfaces lo0"
|
||||
provider: "{{ netconf }}"
|
||||
register: test
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- name: setup
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
- name: configure single command
|
||||
|
@ -34,7 +34,7 @@
|
|||
- name: teardown
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
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 }}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue