Skip to content

Commit

Permalink
anisible-lit fixes after rebase to develop branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
JchhatbarInfoblox committed Jul 16, 2024
1 parent 16c5cd3 commit bb45859
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 33 deletions.
2 changes: 1 addition & 1 deletion plugins/lookup/nios_next_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
- name: return the next 3 available IP addresses for network 192.168.10.0/24
ansible.builtin.set_fact:
ipaddr: "{{ lookup('infoblox.nios_modules.nios_next_ip', '192.168.10.0/24', num=3, \
ipaddr: "{{ lookup('infoblox.nios_modules.nios_next_ip', '192.168.10.0/24', num=3,
provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return the next 3 available IP addresses for network 192.168.10.0/24
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/nios_extensible_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
username: admin
password: admin
connection: local
'''

RETURN = ''' # '''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
- name: cleanup a network ipv4
nios_network:
- name: Cleanup a network ipv4
infoblox.nios_modules.nios_network:
network: 192.168.10.0/24
comment: this is a test comment
state: absent
provider: "{{ nios_provider }}"

- name: configure a network ipv4
nios_network:
- name: Configure a network ipv4
infoblox.nios_modules.nios_network:
network: 192.168.10.0/24
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: nios_ipv4_create1

- name: configure a network ipv4
nios_network:
- name: Configure a network ipv4
infoblox.nios_modules.nios_network:
network: 192.168.10.0/24
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: nios_ipv4_create2

#- assert:
# that:
# - "nios_ipv4_create1.changed"
# - "not nios_ipv4_create2.changed"

- name: set dhcp options for a network ipv4
nios_network:
- name: Set dhcp options for a network ipv4
infoblox.nios_modules.nios_network:
network: 192.168.10.0/24
comment: this is a test comment
options:
Expand All @@ -37,8 +32,8 @@
provider: "{{ nios_provider }}"
register: nios_ipv4_update1

- name: set dhcp options for a network ipv4
nios_network:
- name: Set dhcp options for a network ipv4
infoblox.nios_modules.nios_network:
network: 192.168.10.0/24
comment: this is a test comment
options:
Expand All @@ -48,49 +43,49 @@
provider: "{{ nios_provider }}"
register: nios_ipv4_update2

- name: remove a network ipv4
nios_network:
- name: Remove a network ipv4
infoblox.nios_modules.nios_network:
network: 192.168.10.0/24
state: absent
provider: "{{ nios_provider }}"
register: nios_ipv4_remove1

- name: remove a network ipv4
nios_network:
- name: Remove a network ipv4
infoblox.nios_modules.nios_network:
network: 192.168.10.0/24
state: absent
provider: "{{ nios_provider }}"
register: nios_ipv4_remove2

- name: configure a network ipv6
nios_network:
- name: Configure a network ipv6
infoblox.nios_modules.nios_network:
network: fe80::/64
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: nios_ipv6_create1


- name: configure a network ipv6 with filter option
nios_network:
- name: Configure a network ipv6 with filter option
infoblox.nios_modules.nios_network:
network: fe80::/64
comment: this is a test comment
use_logic_filter_rules: true
state: present
provider: "{{ nios_provider }}"
register: nios_ipv6_update1

- name: configure a network ipv4 with filter option
nios_network:
- name: Configure a network ipv4 with filter option
infoblox.nios_modules.nios_network:
network: 192.168.11.0/24
comment: this is a test comment
use_logic_filter_rules: true
state: present
provider: "{{ nios_provider }}"
register: nios_ipv4_create3

- name: update a network ipv4 with filter option
nios_network:
- name: Update a network ipv4 with filter option
infoblox.nios_modules.nios_network:
network: 192.168.11.0/24
comment: this is a test comment
use_logic_filter_rules: false
Expand All @@ -99,16 +94,16 @@
register: nios_ipv4_update3

- name: Re-run with no changes
nios_network:
infoblox.nios_modules.nios_network:
network: 192.168.11.0/24
comment: this is a test comment
use_logic_filter_rules: false
state: present
provider: "{{ nios_provider }}"
register: nios_ipv4_update4

- name: remove an ipv4 network
nios_network:
- name: Remove an ipv4 network
infoblox.nios_modules.nios_network:
network: 192.168.11.0/24
comment: this is a test comment
use_logic_filter_rules: false
Expand All @@ -117,7 +112,8 @@
register: nios_ipv4_remove3


- assert:
- name: Verify idempotence and changes of network operations
ansible.builtin.assert:
that:
- "nios_ipv4_create1.changed"
- "not nios_ipv4_create2.changed"
Expand Down

0 comments on commit bb45859

Please sign in to comment.