mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
8 years ago
|
---
|
||
|
- debug: msg="START cli/sublevel_exact.yaml"
|
||
|
|
||
|
- name: setup
|
||
|
asa_config:
|
||
|
lines:
|
||
|
- network-object 192.168.10.0 255.255.255.0
|
||
|
- network-object 192.168.20.0 255.255.255.0
|
||
|
- network-object 192.168.30.0 255.255.255.0
|
||
|
- network-object 192.168.40.0 255.255.255.0
|
||
|
- network-object 192.168.50.0 255.255.255.0
|
||
|
parents: ['object-group network OG-ANSIBLE-EXACT']
|
||
|
before: ['no object-group network OG-ANSIBLE-EXACT']
|
||
|
after: ['exit']
|
||
|
provider: "{{ cli }}"
|
||
|
|
||
|
- name: configure sub level command using exact match
|
||
|
asa_config:
|
||
|
lines:
|
||
|
- network-object 192.168.10.0 255.255.255.0
|
||
|
- network-object 192.168.20.0 255.255.255.0
|
||
|
- network-object 192.168.30.0 255.255.255.0
|
||
|
- network-object 192.168.40.0 255.255.255.0
|
||
|
parents: ['object-group network OG-ANSIBLE-EXACT']
|
||
|
after: ['exit']
|
||
|
match: exact
|
||
|
provider: "{{ cli }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.changed == true"
|
||
|
- "'object-group network OG-ANSIBLE-EXACT' in result.updates"
|
||
|
- "'network-object 192.168.10.0 255.255.255.0' in result.updates"
|
||
|
- "'network-object 192.168.20.0 255.255.255.0' in result.updates"
|
||
|
- "'network-object 192.168.30.0 255.255.255.0' in result.updates"
|
||
|
- "'network-object 192.168.40.0 255.255.255.0' in result.updates"
|
||
|
- "'network-object 192.168.50.0 255.255.255.0' not in result.updates"
|
||
|
|
||
|
- name: check sub level command using exact match
|
||
|
asa_config:
|
||
|
lines:
|
||
|
- network-object 192.168.10.0 255.255.255.0
|
||
|
- network-object 192.168.20.0 255.255.255.0
|
||
|
- network-object 192.168.30.0 255.255.255.0
|
||
|
- network-object 192.168.40.0 255.255.255.0
|
||
|
- network-object 192.168.50.0 255.255.255.0
|
||
|
parents: ['object-group network OG-ANSIBLE-EXACT']
|
||
|
after: ['exit']
|
||
|
match: exact
|
||
|
provider: "{{ cli }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.changed == false"
|
||
|
|
||
|
- name: teardown
|
||
|
asa_config:
|
||
|
lines:
|
||
|
- no object-group network OG-ANSIBLE-EXACT
|
||
|
provider: "{{ cli }}"
|
||
|
|
||
|
- debug: msg="END cli/sublevel_exact.yaml"
|