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.
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
8 years ago
|
---
|
||
|
- debug: msg="START cli/removal_error.yaml"
|
||
|
|
||
|
- name: setup
|
||
|
asa_config:
|
||
|
commands:
|
||
|
- clear configure access-list ANSIBLE-DNS
|
||
|
- no object-group network OGA-GOOGLE-DNS
|
||
|
provider: "{{ cli }}"
|
||
|
ignore_errors: yes
|
||
|
|
||
|
- name: configure test object-group
|
||
|
asa_config:
|
||
|
parents: object-group network OGA-GOOGLE-DNS
|
||
|
lines: network-object host 8.8.8.8
|
||
|
provider: "{{ cli }}"
|
||
|
register: result
|
||
|
|
||
|
|
||
|
- name: configure test access-list
|
||
|
asa_config:
|
||
|
lines: access-list ANSIBLE-DNS extended permit udp any object-group OGA-GOOGLE-DNS eq domain
|
||
|
provider: "{{ cli }}"
|
||
|
|
||
|
- name: try to remove object-group (should fail)
|
||
|
asa_config:
|
||
|
commands:
|
||
|
- no object-group network OGA-GOOGLE-DNS
|
||
|
provider: "{{ cli }}"
|
||
|
ignore_errors: yes
|
||
|
register: result
|
||
|
|
||
|
|
||
|
- name: Last command should fail
|
||
|
assert:
|
||
|
that:
|
||
|
- "result.failed == true"
|
||
|
|
||
|
- name: teardown
|
||
|
asa_config:
|
||
|
commands:
|
||
|
- clear configure access-list ANSIBLE-DNS
|
||
|
- no object-group network OGA-GOOGLE-DNS
|
||
|
provider: "{{ cli }}"
|
||
|
|
||
|
- debug: msg="END cli/removal_error.yaml"
|