summaryrefslogtreecommitdiff
path: root/test/integration/targets/asa_config/tests/cli/sublevel.yaml
blob: 2435d9f32c95086eb0c12e4088307295051caed2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- debug: msg="START cli/sublevel.yaml"

- name: setup test
  asa_config:
    lines:
      - 'no object-group network OG-ANSIBLE-SUBLEVEL'
    provider: "{{ cli }}"

- name: configure sub level command
  asa_config:
    lines: ['network-object host 192.168.10.1']
    parents: ['object-group network OG-ANSIBLE-SUBLEVEL']
    provider: "{{ cli }}"
  register: result

- assert:
    that:
      - "result.changed == true"
      - "'object-group network OG-ANSIBLE-SUBLEVEL' in result.updates"
      - "'network-object host 192.168.10.1' in result.updates"

- name: configure sub level command idempotent check
  asa_config:
    lines: ['network-object host 192.168.10.1']
    parents: ['object-group network OG-ANSIBLE-SUBLEVEL']
    provider: "{{ cli }}"
  register: result

- assert:
    that:
      - "result.changed == false"

- name: teardown
  asa_config:
    lines:
      - 'no object-group network OG-ANSIBLE-SUBLEVEL'
    provider: "{{ cli }}"

- debug: msg="END cli/sublevel.yaml"