mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-23 01:19:08 -07:00
fix nxos_snmp_community issues (#39258)
This commit is contained in:
parent
86817cdd52
commit
1afec5a48e
3 changed files with 57 additions and 5 deletions
|
@ -17,7 +17,6 @@
|
|||
nxos_snmp_community: &config
|
||||
community: TESTING7
|
||||
group: network-operator
|
||||
#access: ro
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
@ -34,6 +33,22 @@
|
|||
that:
|
||||
- "result.changed == false"
|
||||
|
||||
- name: Change snmp_community group
|
||||
nxos_snmp_community: &chg
|
||||
community: TESTING7
|
||||
group: network-admin
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: Idempotence Check
|
||||
nxos_snmp_community: *chg
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
- name: Remove snmp_community
|
||||
nxos_snmp_community: *remove
|
||||
register: result
|
||||
|
@ -91,6 +106,40 @@
|
|||
|
||||
- assert: *false
|
||||
|
||||
- name: Change acl
|
||||
nxos_snmp_community: &chgacl
|
||||
community: TESTING7
|
||||
access: rw
|
||||
acl: new_acl
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: Idempotence Check
|
||||
nxos_snmp_community: *chgacl
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
- name: Remove acl
|
||||
nxos_snmp_community: &removeacl
|
||||
community: TESTING7
|
||||
access: rw
|
||||
acl: default
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: Idempotence Check
|
||||
nxos_snmp_community: *removeacl
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
always:
|
||||
- name: Cleanup
|
||||
nxos_snmp_community: *remove
|
||||
|
|
|
@ -1198,7 +1198,6 @@ lib/ansible/modules/network/nxos/nxos_pim_interface.py E326
|
|||
lib/ansible/modules/network/nxos/nxos_pim_rp_address.py E326
|
||||
lib/ansible/modules/network/nxos/nxos_reboot.py E325
|
||||
lib/ansible/modules/network/nxos/nxos_smu.py E324
|
||||
lib/ansible/modules/network/nxos/nxos_snmp_community.py E324
|
||||
lib/ansible/modules/network/nxos/nxos_system.py E325
|
||||
lib/ansible/modules/network/nxos/nxos_vpc.py E324
|
||||
lib/ansible/modules/network/nxos/nxos_vpc_interface.py E325
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue