infoblox-ansible
infoblox-ansible copied to clipboard
nios_nsgroup: removal from list not handled correctly
I was asked to move my issue from the ansible-collections repo to the infoblox-ansible repo. So here it is.
SUMMARY
removal of a server from the external_primaries
or external_secondaries
list is not noticed. The changes won't be applied.
ISSUE TYPE
- Bug Report
COMPONENT NAME
plugins/modules/net_tools/nios/nios_nsgroup.py
ANSIBLE VERSION
ansible 2.9.9
config file = /home/testuser/ansible-infoblox/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
CONFIGURATION
default
OS / ENVIRONMENT
RHEL7
STEPS TO REPRODUCE
---
- name: test
connection: local
nios_nsgroup:
name: "test_nsgroup"
state: present
provider: "{{ my_grid }}"
grid_primary:
- name: "{{ grid_fqdn }}"
stealth: no
external_secondaries:
- address: 1.1.1.1
name: server1.example.com
stealth: yes
tsig_key_name: ""
- address: 9.9.9.9
name: server2.example.com
stealth: yes
tsig_key_name: ""
...
- run the playbook above.
- remove 'server2.example.com' from the list
- run the playbook again
EXPECTED RESULTS
ansible notices the changes done in step 2 and applies the changes when running in step 3
ACTUAL RESULTS
ansible does not notice the change from step 2 when running in step 3
[root@testhost ansible-infoblox]# ansible-playbook site.yml
PLAY [all] ***********************************************************************************************************************
TASK [infoblox : test] ***********************************************************************************************************
ok: [localhost]
PLAY RECAP ***********************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0