mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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
|
@ -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"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
dellos10_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: teardown
|
||||
dellos10_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
dellos10_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
dellos10_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
dellos10_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
dellos10_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
dellos10_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
- name: teardown
|
||||
dellos10_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
dellos6_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: teardown
|
||||
dellos6_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
dellos6_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
dellos6_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
dellos6_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
dellos6_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
dellos6_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
- name: teardown
|
||||
dellos6_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
dellos9_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: teardown
|
||||
dellos9_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
dellos9_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
dellos9_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
dellos9_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
dellos9_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
dellos9_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
- name: teardown
|
||||
dellos9_config:
|
||||
lines: ['hostname {{ inventory_hostname }}']
|
||||
lines: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
eos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
match: none
|
||||
provider: "{{ cli }}"
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
- name: teardown
|
||||
eos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
match: none
|
||||
provider: "{{ cli }}"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
eos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
match: none
|
||||
provider: "{{ eapi }}"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: teardown
|
||||
eos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
match: none
|
||||
provider: "{{ eapi }}"
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
eos_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
match: none
|
||||
provider: "{{ eapi }}"
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
eos_config:
|
||||
lines:
|
||||
- no snmp-server contact
|
||||
- hostname {{ inventory_hostname }}
|
||||
- hostname {{ inventory_hostname_short }}
|
||||
match: none
|
||||
provider: "{{ eapi }}"
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
eos_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
match: none
|
||||
provider: "{{ eapi }}"
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
eos_config:
|
||||
lines:
|
||||
- no snmp-server contact ansible
|
||||
- hostname {{ inventory_hostname }}
|
||||
- hostname {{ inventory_hostname_short }}
|
||||
match: none
|
||||
provider: "{{ eapi }}"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -12,7 +12,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
|
||||
|
||||
|
@ -37,7 +37,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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
iosxr_config:
|
||||
commands: ['hostname {{ inventory_hostname }}']
|
||||
commands: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: teardown
|
||||
iosxr_config:
|
||||
commands: ['hostname {{ inventory_hostname }}']
|
||||
commands: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
iosxr_config:
|
||||
commands:
|
||||
- "no cdp"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
iosxr_config:
|
||||
commands:
|
||||
- "no cdp"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
iosxr_config:
|
||||
commands:
|
||||
- "no cdp"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
iosxr_config:
|
||||
commands:
|
||||
- "no cdp"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
iosxr_config:
|
||||
commands: ['hostname {{ inventory_hostname }}']
|
||||
commands: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
- name: teardown
|
||||
iosxr_config:
|
||||
commands: ['hostname {{ inventory_hostname }}']
|
||||
commands: ['hostname {{ inventory_hostname_short }}']
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
hostname {{ inventory_hostname }}
|
||||
hostname {{ inventory_hostname_short }}
|
||||
!
|
||||
interface Loopback999
|
||||
description this is a test
|
||||
|
|
|
@ -12,7 +12,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
|
||||
|
||||
|
@ -37,7 +37,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
|
||||
|
||||
|
|
|
@ -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 }}"
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
- name: Ensure we can communicate over 8080
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ netconf }}"
|
||||
port: 8080
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
- name: Ensure we can NOT communicate over default port
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
ignore_errors: true
|
||||
|
@ -62,7 +62,7 @@
|
|||
- name: Ensure we can communicate over netconf
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
- debug: msg="END netconf/changeport.yaml"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
- name: Ensure we can communicate over netconf
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ netconf }}"
|
||||
|
||||
# Disable netconf
|
||||
|
@ -52,7 +52,7 @@
|
|||
- name: Ensure we can NOT talk via netconf
|
||||
junos_config:
|
||||
lines:
|
||||
- set system host-name {{ inventory_hostname }}
|
||||
- set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
ignore_errors: true
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
nxos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: teardown
|
||||
nxos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
nxos_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
nxos_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
nxos_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
nxos_config:
|
||||
lines:
|
||||
- "no snmp-server contact"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
nxos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
- name: teardown
|
||||
nxos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
nxos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
provider: "{{ nxapi }}"
|
||||
match: none
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: teardown
|
||||
nxos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
provider: "{{ nxapi }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
nxos_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ nxapi }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
nxos_config:
|
||||
lines:
|
||||
- "no snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ nxapi }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
nxos_config:
|
||||
lines:
|
||||
- "snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ nxapi }}"
|
||||
match: none
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
nxos_config:
|
||||
lines:
|
||||
- "no snmp-server contact ansible"
|
||||
- "hostname {{ inventory_hostname }}"
|
||||
- "hostname {{ inventory_hostname_short }}"
|
||||
provider: "{{ nxapi }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
nxos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
provider: "{{ nxapi }}"
|
||||
match: none
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
- name: setup
|
||||
nxos_config:
|
||||
lines: hostname {{ inventory_hostname }}
|
||||
lines: hostname {{ inventory_hostname_short }}
|
||||
provider: "{{ nxapi }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
vyos_config:
|
||||
lines: set system host-name {{ inventory_hostname }}
|
||||
lines: set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
- name: teardown
|
||||
vyos_config:
|
||||
lines: set system host-name {{ inventory_hostname }}
|
||||
lines: set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: setup
|
||||
vyos_config:
|
||||
lines: set system host-name {{ inventory_hostname }}
|
||||
lines: set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: teardown
|
||||
vyos_config:
|
||||
lines: set system host-name {{ inventory_hostname }}
|
||||
lines: set system host-name {{ inventory_hostname_short }}
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
|
||||
|
|
Loading…
Reference in a new issue