blob: 36204438fc1c8b9fe3e3f324fc974addc3dad8e1 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
---
- debug: msg="START cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection }}"
- name: setup
eos_config:
lines:
- class-map type qos match-any c1
- match ip access-group 10
- policy-map type qos p1
- class c1
before: ['no policy-map type qos p1', 'no class-map type qos match-any c1']
match: none
become: yes
- name: configure sub level command using strict match
eos_config:
lines:
- set cos 1
- set dscp 62
parents: ['policy-map type qos p1', 'class c1']
match: strict
register: result
become: yes
- assert:
that:
- "result.changed == true"
- "'set cos 1' in result.updates"
- "'set dscp 62' in result.updates"
- name: change sub level command order and config with strict match
eos_config:
lines:
- set dscp 62
- set cos 1
parents: ['policy-map type qos p1', 'class c1']
match: strict
register: result
become: yes
- assert:
that:
- "result.changed == true"
- "'set cos 1' in result.updates"
- "'set dscp 62' in result.updates"
- name: Config sub level command with strict match (Idempotency)
eos_config:
lines:
#EOS does not change order of class action if reconfigured
#so we have to use old order for Idempotency
- set cos 1
- set dscp 62
parents: ['policy-map type qos p1', 'class c1']
match: strict
register: result
become: yes
- assert:
that:
- "result.changed == false"
- name: teardown
eos_config:
lines:
- no policy-map type qos p1
- no class-map type qos match-any c1
match: none
become: yes
- debug: msg="END cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection }}"
|