cisco.ios
cisco.ios copied to clipboard
ios_users - Replace old module ios_user
SUMMARY
Replace the module ios_user with a more standard file coverage. And also take correctly some parts of the commands (by example, the current module doesn't take correctly the privilegepart of the username command
ISSUE TYPE
- New Module Pull Request
COMPONENT NAME
ios_users
ADDITIONAL INFORMATION
Module to manage the users and enable on IOS with the following parts:
- allow to create one
enableper level - manage user with :
- the secret (or password)
- the privilege of the user
- the description of the user
Here an example of the configuration
- name: Example config
cisco.ios.ios_users:
config:
enable:
- password:
type: secret
hash: 9
value: "$9$q3zuC3f3vjWnWk$4BwPgPt25AUkm8Gts6aqW.NLK/90zBDnmWtOeMQqoDo"
users:
- name: "johndoe"
command: "old"
parameters:
privilege: 15
password:
type: secret
hash: 9
value: "$9$q3zuC3f3vjWnWk$4BwPgPt25AUkm8Gts6aqW.NLK/90zBDnmWtOeMQqoDo"
- name: "msmith"
command: "new"
parameters:
password:
type: secret
hash: 9
value: "$9$q3zuC3f3vjWnWk$4BwPgPt25AUkm8Gts6aqW.NLK/89zBDnmWtOeMQqoDo"
And the command generated:
enable secret 9 $9$q3zuC3f3vjWnWk$4BwPgPt25AUkm8Gts6aqW.NLK/90zBDnmWtOeMQqoDo
username johndoe privilege 15 secret 9 $9$q3zuC3f3vjWnWk$4BwPgPt25AUkm8Gts6aqW.NLK/90zBDnmWtOeMQqoDo
user-name msmith
secret 9 $9$q3zuC3f3vjWnWk$4BwPgPt25AUkm8Gts6aqW.NLK/89zBDnmWtOeMQqoDo
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.00%. Comparing base (
839d3d7) to head (8b3767e). Report is 26 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #909 +/- ##
==========================================
+ Coverage 86.79% 87.00% +0.20%
==========================================
Files 196 204 +8
Lines 12253 12373 +120
==========================================
+ Hits 10635 10765 +130
+ Misses 1618 1608 -10
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/ccf76b45e378458ab21b6f6d967be472
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 53s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 57s :x: ansible-ee-integration-ios-latest FAILURE in 15m 37s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 16m 23s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 15m 33s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 14m 22s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 13m 46s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 14m 48s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 12m 30s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 12m 23s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 17s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/341fe4558cc54adeab318501ae6c61e9
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 40s :heavy_check_mark: build-ansible-collection SUCCESS in 9m 10s :x: ansible-ee-integration-ios-latest FAILURE in 15m 21s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 14m 07s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 13m 10s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 15m 00s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 13m 13s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 14m 23s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 13m 44s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 13m 46s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 11m 42s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/bdb27f2b374b458286b061505483224d
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 46s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 40s :x: ansible-ee-integration-ios-latest FAILURE in 11m 58s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 12m 38s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 12m 51s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 13m 27s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 12m 23s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 14m 06s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 13m 00s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 13m 14s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 13s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/b6e1b3161a9044bab4e046b07b549ea6
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 46s :heavy_check_mark: build-ansible-collection SUCCESS in 9m 07s :x: ansible-ee-integration-ios-latest FAILURE in 13m 11s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 13m 49s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 13m 36s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 12m 18s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 14m 15s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 13m 07s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 26m 58s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 26m 57s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 24s
Finally, I still have the issue with the no username command that doesn't work...
I will check if I found a solution...
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/564d6b32413e4f82a26a50d5d2b0b8e6
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 45s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 45s :x: ansible-ee-integration-ios-latest FAILURE in 15m 46s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 16m 20s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 15m 41s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 13m 21s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 15m 37s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 16m 41s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 16m 46s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 16m 56s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 24s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/31da8bee5fad4f34bc055c1e310d1736
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 42s :heavy_check_mark: build-ansible-collection SUCCESS in 9m 33s :x: ansible-ee-integration-ios-latest FAILURE in 11m 42s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 12m 36s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 11m 55s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 15m 37s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 16m 02s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 13m 45s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 13m 04s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 15m 53s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 11m 11s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/9f1687cab3d443358adbcc76d2a163b8
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 59s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 37s :x: ansible-ee-integration-ios-latest FAILURE in 14m 02s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 14m 51s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 11m 48s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 12m 32s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 12m 32s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 13m 51s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 13m 50s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 13m 51s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 12s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/0c9750e1f92a4c308c1965e5aa77c754
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 49s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 51s :x: ansible-ee-integration-ios-latest FAILURE in 16m 10s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 16m 08s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 16m 17s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 16m 33s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 16m 35s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 16m 36s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 16m 25s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 12m 11s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 25s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/bf3ad9423f804427b7824dc3875fbf07
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 27s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 39s :x: ansible-ee-integration-ios-latest FAILURE in 17m 24s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 17m 28s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 17m 11s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 15m 33s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 16m 06s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 13m 04s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 16m 32s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 11m 53s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 08s
@earendilfr Can we please rename the module to ios_users instead of ios_user_global, I'll review the PR in detail. Thank you for your contribution.
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/050f2ad90e684e22b4d9a9929127f3de
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 50s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 40s :x: ansible-ee-integration-ios-latest FAILURE in 22m 49s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 23m 01s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 21m 08s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 21m 56s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 21m 40s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 23m 31s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 22m 25s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 23m 37s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 05s
@earendilfr Can we please rename the module to ios_users instead of ios_user_global, I'll review the PR in detail. Thank you for your contribution.
Hi @KB-perByte, I can do it but I have one question : the configuration in my module is not compatible with the configuration for the old one. It would be a compatibility problem if I rewrite the module with the same name...
How could I handle this point ? Did I need also to write a converter to convert old configuration scheme to the new one?
Hey @earendilfr this module is to be named ios_users keeping the older ios_user module ( note: with a deprecation notice )
Regards
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/b3b87e15bc5d415e9865727b9c15829f
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 30s :heavy_check_mark: build-ansible-collection SUCCESS in 9m 04s :x: ansible-ee-integration-ios-latest FAILURE in 14m 14s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 15m 46s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 13m 20s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 14m 08s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 12m 00s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 13m 51s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 14m 14s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 14m 20s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 22s
Hey @earendilfr this module is to be named
ios_userskeeping the olderios_usermodule ( note: with a deprecation notice ) Regards
@KB-perByte : Ok: I have updated the PR as requested.
So, now, I have some questions:
- I have choose to indicate an deprecated date for the old module
ios_userto the 2024-10-01 (in one year). Did you prefer to choose another target date ? - I have some issue in the sanity check with the deprecated info and I don't understand why (only present with python 3.8 or less)...
And I have also a last question regarding the test task ack / ack / ack (pull_request_target):
I think this test is in error because my PR doesn't have a tagadded automatically but how can I force the system to add the right tag to the PR ? Did I need to add a magic word to my PR to allow the tagging system to work?
Thanks a lot.
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/41264a983e3b4db49fe0432beae74698
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 41s :heavy_check_mark: build-ansible-collection SUCCESS in 9m 05s :x: ansible-ee-integration-ios-latest FAILURE in 11m 50s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 21m 01s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 13m 37s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 14m 08s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 19m 39s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 24m 15s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 24m 02s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 18m 26s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 32s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/343c16329de7462bbb4ad489956ee4fa
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 37s :heavy_check_mark: build-ansible-collection SUCCESS in 8m 52s :x: ansible-ee-integration-ios-latest FAILURE in 14m 58s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 21m 20s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 FAILURE in 20m 46s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 FAILURE in 20m 50s (non-voting) :x: ansible-ee-integration-ios-libssh-latest FAILURE in 14m 48s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 17m 20s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 16m 28s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 16m 35s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 10m 13s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/4838eb4c7e8c4646ac0c5bd91a160a2e
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 54s :heavy_check_mark: build-ansible-collection SUCCESS in 9m 37s :x: ansible-ee-integration-ios-latest RETRY_LIMIT in 4m 07s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 20m 05s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 RETRY_LIMIT in 3m 10s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 RETRY_LIMIT in 3m 45s (non-voting) :x: ansible-ee-integration-ios-libssh-latest RETRY_LIMIT in 4m 21s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 20m 04s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 RETRY_LIMIT in 3m 46s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 RETRY_LIMIT in 3m 54s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 11m 27s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/8ab6f90c76054adbb0d21a0393266ed7
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 54s :heavy_check_mark: build-ansible-collection SUCCESS in 10m 00s :x: ansible-ee-integration-ios-latest RETRY_LIMIT in 3m 29s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 15m 34s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 RETRY_LIMIT in 3m 43s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 RETRY_LIMIT in 3m 51s (non-voting) :x: ansible-ee-integration-ios-libssh-latest RETRY_LIMIT in 3m 21s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 23m 43s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 RETRY_LIMIT in 3m 12s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 RETRY_LIMIT in 3m 28s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 11m 32s
Label error. Requires exactly 1 of: bug, enhancement, major, minor, patch, skip-changelog. Found:
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/1bc9024f2aa040508e72706fd3ff5b3b
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 29s :heavy_check_mark: build-ansible-collection SUCCESS in 9m 36s :x: ansible-ee-integration-ios-latest RETRY_LIMIT in 3m 27s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 12m 48s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 RETRY_LIMIT in 3m 33s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 RETRY_LIMIT in 2m 55s (non-voting) :x: ansible-ee-integration-ios-libssh-latest RETRY_LIMIT in 3m 40s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 15m 31s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 RETRY_LIMIT in 3m 10s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 RETRY_LIMIT in 3m 38s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 11m 33s
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/5d1ffdf3192647b38580d90d4ea95d00
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 29s :heavy_check_mark: build-ansible-collection SUCCESS in 9m 58s :x: ansible-ee-integration-ios-latest RETRY_LIMIT in 3m 11s (non-voting) :x: ansible-ee-integration-ios-stable-2.9 FAILURE in 12m 19s (non-voting) :x: ansible-ee-integration-ios-stable-2.11 RETRY_LIMIT in 3m 14s (non-voting) :x: ansible-ee-integration-ios-stable-2.12 RETRY_LIMIT in 3m 13s (non-voting) :x: ansible-ee-integration-ios-libssh-latest RETRY_LIMIT in 3m 03s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 12m 13s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.11 RETRY_LIMIT in 3m 29s (non-voting) :x: ansible-ee-integration-ios-libssh-stable-2.12 RETRY_LIMIT in 3m 30s (non-voting) :heavy_check_mark: ansible-tox-linters SUCCESS in 12m 17s