1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix some net_* tests (#33593)

* Fix typo in net_logging/eos

* This seems to be required to use eos_user in this way

* Fix indentation in net_static_route/eos

* Rework interface check in eos_vrf

This should do the right thing.
This commit is contained in:
Nathaniel Case 2017-12-06 05:24:58 -05:00 committed by John R Barker
parent a28eb94f1a
commit 425537861a
4 changed files with 5 additions and 4 deletions

View file

@ -237,7 +237,7 @@ def check_declarative_intent_params(want, module):
for i in w['interfaces']:
obj_in_have = search_obj_in_list(w['name'], have)
if obj_in_have and 'interfaces' in obj_in_have and i not in obj_in_have['interfaces']:
if obj_in_have and i not in obj_in_have.get('interfaces', []):
module.fail_json(msg="Interface %s not configured on vrf %s" % (i, w['name']))

View file

@ -84,7 +84,7 @@
net_logging:
aggregate:
- { dest: console, level: warnings, state: absent }
- { dest: monitor, level: debuggning, state: absent }
- { dest: monitor, level: debugging, state: absent }
authorize: yes
provider: "{{ cli }}"
register: result

View file

@ -59,8 +59,8 @@
aggregate:
- { address: 192.168.4.0/24, next_hop: 192.168.0.1 }
- { address: 192.168.5.0/24, next_hop: 192.168.0.1 }
authorize: yes
provider: "{{ cli }}"
authorize: yes
provider: "{{ cli }}"
register: result
- assert:

View file

@ -2,6 +2,7 @@
- name: Set user to privilege level 15
net_user:
name: netop
nopassword: yes
privilege: 15
state: present
authorize: yes