-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
frr_ospf3_general.yml
78 lines (69 loc) · 1.95 KB
/
frr_ospf3_general.yml
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
72
73
74
75
76
77
78
---
- name: Testing FRR-OSPFv3 general settings
hosts: localhost
gather_facts: no
module_defaults:
group/ansibleguy.opnsense.all:
firewall: "{{ lookup('ansible.builtin.env', 'TEST_FIREWALL') }}"
api_credential_file: "{{ lookup('ansible.builtin.env', 'TEST_API_KEY') }}"
ssl_verify: false
ansibleguy.opnsense.list:
target: 'frr_ospf3_general'
tasks:
- name: Listing
ansibleguy.opnsense.list:
register: opn_pre1
failed_when: >
opn_pre1.failed or
'data' not in opn_pre1
- name: Configuring
ansibleguy.opnsense.frr_ospf3_general:
id: '10.0.0.1'
redistribute: ['static']
enabled: true
register: opn1
failed_when: >
opn1.failed or
not opn1.changed
- name: Changing
ansibleguy.opnsense.frr_ospf3_general:
id: '10.0.1.1'
redistribute: ['static', 'kernel']
enabled: true
register: opn5
failed_when: >
opn5.failed or
not opn5.changed
- name: Disabling 1
ansibleguy.opnsense.frr_ospf3_general:
id: '10.0.1.1'
redistribute: ['static', 'kernel']
enabled: false
register: opn2
failed_when: >
opn2.failed or
not opn2.changed
when: not ansible_check_mode
- name: Disabling 1 - nothing changed
ansibleguy.opnsense.frr_ospf3_general:
id: '10.0.1.1'
redistribute: ['static', 'kernel']
enabled: false
register: opn3
failed_when: >
opn3.failed or
opn3.changed
when: not ansible_check_mode
- name: Enabling 1
ansibleguy.opnsense.frr_ospf3_general:
id: '10.0.1.1'
redistribute: ['static', 'kernel']
register: opn4
failed_when: >
opn4.failed or
not opn4.changed
when: not ansible_check_mode
- name: Cleanup
ansibleguy.opnsense.frr_ospf3_general:
enabled: false
when: not ansible_check_mode