changed collection arg to argregate on 2.4 network modules (#26649)

* changed collection arg to argregate on 2.4 network modules

* replace users with aggregate in eos_user, junos_user, nxos_user

* added version_added to places where we replaced users with aggregate in the docs

* fix ios_static_route test

* update tests to reference aggregate instead of collection/users
This commit is contained in:
David Newswanger
2017-07-26 10:09:17 -04:00
committed by Peter Sprygada
parent 9d771f6eea
commit 8643e9cb34
42 changed files with 170 additions and 167 deletions

View File

@@ -16,7 +16,7 @@
- name: Collection of users
eos_user:
users:
aggregate:
- username: test1
- username: test2
authorize: yes

View File

@@ -90,9 +90,9 @@
that:
- 'result.changed == false'
- name: Add static route collections
- name: Add static route aggregates
ios_static_route:
collection:
aggregate:
- { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
state: present
@@ -105,9 +105,9 @@
- 'result.changed == true'
- 'result.commands == ["ip route 172.16.32.0 255.255.255.0 10.0.0.8 1", "ip route 172.16.33.0 255.255.255.0 10.0.0.8 1"]'
- name: Add and remove static route collections with overrides
- name: Add and remove static route aggregates with overrides
ios_static_route:
collection:
aggregate:
- { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8, state: absent }
- { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
@@ -121,9 +121,9 @@
- 'result.changed == true'
- 'result.commands == ["no ip route 172.16.33.0 255.255.255.0 10.0.0.8", "ip route 172.16.34.0 255.255.255.0 10.0.0.8 1"]'
- name: Remove static route collections
- name: Remove static route aggregates
ios_static_route:
collection:
aggregate:
- { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }

View File

@@ -16,7 +16,7 @@
- name: Collection of users (SetUp)
ios_user:
users:
aggregate:
- name: ansibletest2
- name: ansibletest3
authorize: yes
@@ -47,7 +47,7 @@
- name: Add collection of users again (Idempotent)
ios_user:
users:
aggregate:
- name: anisbletest2
- name: ansibletest3
authorize: yes
@@ -63,7 +63,7 @@
- name: tearDown
ios_user:
users:
aggregate:
- name: ansibletest1
- name: ansibletest2
- name: ansibletest3

View File

@@ -83,7 +83,7 @@
- name: Collection of users (SetUp)
iosxr_user:
users:
aggregate:
- name: ansibletest2
- name: ansibletest3
password: test
@@ -104,7 +104,7 @@
- name: Add collection of users again with update_password always (not idempotent)
iosxr_user:
users:
aggregate:
- name: ansibletest2
- name: ansibletest3
password: test
@@ -123,7 +123,7 @@
- name: Add collection of users again with update_password on_create (idempotent)
iosxr_user:
users:
aggregate:
- name: ansibletest2
- name: ansibletest3
password: test
@@ -140,7 +140,7 @@
- name: Delete collection of users
iosxr_user:
users:
aggregate:
- name: ansibletest1
- name: ansibletest2
- name: ansibletest3
@@ -155,7 +155,7 @@
- name: Delete collection of users again (idempotent)
iosxr_user:
users:
aggregate:
- name: ansibletest1
- name: ansibletest2
- name: ansibletest3

View File

@@ -123,7 +123,7 @@
- name: Teardown list of users
junos_user:
collection:
aggregate:
- {name: test_user1, state: absent}
- {name: test_user2, state: absent}
provider: "{{ netconf }}"
@@ -131,7 +131,7 @@
- name: Create list of users
junos_user:
collection:
aggregate:
- {name: test_user1, full_name: test_user2, role: operator, state: present}
- {name: test_user2, full_name: test_user2, role: read-only, state: present}
provider: "{{ netconf }}"
@@ -151,7 +151,7 @@
- name: Delete list of users
junos_user:
collection:
aggregate:
- {name: test_user1, full_name: test_user2, role: operator, state: absent}
- {name: test_user2, full_name: test_user2, role: read-only, state: absent}
provider: "{{ netconf }}"

View File

@@ -126,7 +126,7 @@
- name: Create collection of linkagg definitions
net_linkagg:
collection:
aggregate:
- { name: bond0, members: [eth1, eth2] }
- { name: bond1, members: [eth3, eth4] }
state: present
@@ -144,7 +144,7 @@
- name: Create collection of linkagg definitions again (idempotent)
net_linkagg:
collection:
aggregate:
- { name: bond0, members: [eth1, eth2] }
- { name: bond1, members: [eth3, eth4] }
state: present
@@ -156,7 +156,7 @@
- name: Remove collection of linkagg definitions
net_linkagg:
collection:
aggregate:
- { name: bond0 }
- { name: bond1 }
state: absent
@@ -174,7 +174,7 @@
- name: Remove collection of linkagg definitions again (idempotent)
net_linkagg:
collection:
aggregate:
- { name: bond0 }
- { name: bond1 }
state: absent

View File

@@ -86,7 +86,7 @@
- name: Add logging collections
net_logging:
collection:
aggregate:
- { dest: file, name: test1, facility: all, level: info }
- { dest: file, name: test2, facility: news, level: debug }
state: present
@@ -101,7 +101,7 @@
- name: Add and remove logging collections with overrides
net_logging:
collection:
aggregate:
- { dest: console, facility: all, level: info }
- { dest: file, name: test1, facility: all, level: info, state: absent }
- { dest: console, facility: daemon, level: warning }
@@ -117,7 +117,7 @@
- name: Remove logging collections
net_logging:
collection:
aggregate:
- { dest: console, facility: all, level: info }
- { dest: console, facility: daemon, level: warning }
- { dest: file, name: test2, facility: news, level: debug }

View File

@@ -94,7 +94,7 @@
- name: Add static route collections
net_static_route:
collection:
aggregate:
- { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
state: present
@@ -109,7 +109,7 @@
- name: Add and remove static route collections with overrides
net_static_route:
collection:
aggregate:
- { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8, state: absent }
- { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
@@ -125,7 +125,7 @@
- name: Remove static route collections
net_static_route:
collection:
aggregate:
- { prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }
- { prefix: 172.16.34.0, mask: 255.255.255.0, next_hop: 10.0.0.8 }

View File

@@ -82,7 +82,7 @@
- name: Add static route collections
net_static_route:
collection:
aggregate:
- { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 }
- { prefix: 172.24.2.0, mask: 24, next_hop: 192.168.42.64 }
state: present
@@ -97,7 +97,7 @@
- name: Add and remove static route collections with overrides
net_static_route:
collection:
aggregate:
- { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 }
- { prefix: 172.24.2.0/24, next_hop: 192.168.42.64, state: absent }
- { prefix: 172.24.3.0/24, next_hop: 192.168.42.64 }
@@ -113,7 +113,7 @@
- name: Remove static route collections
net_static_route:
collection:
aggregate:
- { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 }
- { prefix: 172.24.3.0/24, next_hop: 192.168.42.64 }
state: absent

View File

@@ -1,7 +1,7 @@
---
- name: Set multiple users role
net_user:
collection:
aggregate:
- name: netop
- name: netend
role: network-operator

View File

@@ -73,7 +73,7 @@
- name: Teardown list of users
net_user:
collection:
aggregate:
- {name: test_user1, state: absent}
- {name: test_user2, state: absent}
provider: "{{ netconf }}"
@@ -81,7 +81,7 @@
- name: Create list of users
net_user:
collection:
aggregate:
- {name: test_user1, role: operator, state: present}
- {name: test_user2, role: read-only, state: present}
provider: "{{ netconf }}"
@@ -101,7 +101,7 @@
- name: Delete list of users
net_user:
collection:
aggregate:
- {name: test_user1, role: operator, state: absent}
- {name: test_user2, role: read-only, state: absent}
provider: "{{ netconf }}"

View File

@@ -1,7 +1,7 @@
---
- name: Set multiple users role
net_user:
collection:
aggregate:
- name: netop
- name: netend
role: network-operator

View File

@@ -15,7 +15,7 @@
- name: Collection of users
nxos_user:
users:
aggregate:
- name: test1
- name: test2
authorize: yes

View File

@@ -15,7 +15,7 @@
- name: Collection of users
nxos_user:
users:
aggregate:
- name: test1
- name: test2
authorize: yes

View File

@@ -127,7 +127,7 @@
- name: Create collection of linkagg definitions
vyos_linkagg:
collection:
aggregate:
- { name: bond0, members: [eth1] }
- { name: bond1, members: [eth2] }
state: present
@@ -143,7 +143,7 @@
- name: Create collection of linkagg definitions again (idempotent)
vyos_linkagg:
collection:
aggregate:
- { name: bond0, members: [eth1] }
- { name: bond1, members: [eth2] }
state: present
@@ -155,7 +155,7 @@
- name: Remove collection of linkagg definitions
vyos_linkagg:
collection:
aggregate:
- { name: bond0 }
- { name: bond1 }
state: absent
@@ -171,7 +171,7 @@
- name: Remove collection of linkagg definitions again (idempotent)
vyos_linkagg:
collection:
aggregate:
- { name: bond0 }
- { name: bond1 }
state: absent

View File

@@ -86,7 +86,7 @@
- name: Add logging collections
vyos_logging:
collection:
aggregate:
- { dest: file, name: test1, facility: all, level: info }
- { dest: file, name: test2, facility: news, level: debug }
state: present
@@ -101,7 +101,7 @@
- name: Add and remove logging collections with overrides
vyos_logging:
collection:
aggregate:
- { dest: console, facility: all, level: info }
- { dest: file, name: test1, facility: all, level: info, state: absent }
- { dest: console, facility: daemon, level: warning }
@@ -117,7 +117,7 @@
- name: Remove logging collections
vyos_logging:
collection:
aggregate:
- { dest: console, facility: all, level: info }
- { dest: console, facility: daemon, level: warning }
- { dest: file, name: test2, facility: news, level: debug }

View File

@@ -82,7 +82,7 @@
- name: Add static route collections
vyos_static_route:
collection:
aggregate:
- { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 }
- { prefix: 172.24.2.0, mask: 24, next_hop: 192.168.42.64 }
state: present
@@ -97,7 +97,7 @@
- name: Add and remove static route collections with overrides
vyos_static_route:
collection:
aggregate:
- { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 }
- { prefix: 172.24.2.0/24, next_hop: 192.168.42.64, state: absent }
- { prefix: 172.24.3.0/24, next_hop: 192.168.42.64 }
@@ -113,7 +113,7 @@
- name: Remove static route collections
vyos_static_route:
collection:
aggregate:
- { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 }
- { prefix: 172.24.3.0/24, next_hop: 192.168.42.64 }
state: absent

View File

@@ -15,7 +15,7 @@
- name: Collection of users (SetUp)
vyos_user:
users:
aggregate:
- name: ansibletest2
- name: ansibletest3
level: operator
@@ -44,7 +44,7 @@
- name: Add collection of users (Idempotent)
vyos_user:
users:
aggregate:
- name: ansibletest2
- name: ansibletest3
level: operator