-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relax restrictions on replace option with block and src
- Loading branch information
Ashwini Mhatre
committed
Oct 12, 2023
1 parent
6420bd6
commit d54384a
Showing
5 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
minor_changes: | ||
- "ios_config - Relax restrictions on I(src) parameter so it can be used more like I(lines)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/integration/targets/ios_config/templates/basic/acl_config.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ip access-list extended test | ||
permit ip host 192.0.2.1 any log | ||
permit ip host 192.0.2.2 any log | ||
permit ip host 192.0.2.3 any log |
28 changes: 28 additions & 0 deletions
28
tests/integration/targets/ios_config/tests/cli/replace_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
- ansible.builtin.debug: msg="START cli/replace_block.yaml on connection={{ ansible_connection }}" | ||
|
||
- name: "Populate nxos acls configuration with replace block and lines options" | ||
cisco.ios.ios_config: | ||
lines: | ||
- permit ip host 192.0.2.1 any log | ||
- permit ip host 192.0.2.2 any log | ||
- permit ip host 192.0.2.3 any log | ||
- permit ip host 192.0.2.4 any log | ||
- permit ip host 192.0.2.5 any log | ||
parents: ip access-list extended test | ||
before: no ip access-list extended test | ||
replace: block | ||
|
||
- ansible.builtin.assert: | ||
that: | ||
- result.changed == true | ||
|
||
- name: "Populate acl configuration with replace block and src options" | ||
cisco.ios.ios_config: | ||
src: basic/acl_config.j2 | ||
before: "no ip access-list extended test" | ||
replace: block | ||
|
||
- ansible.builtin.assert: | ||
that: | ||
- result.changed == true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters