-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS/XR iosxr_user module on 5.3 and 6.1 release does not work #328
Comments
could you please try without admin: true?
|
Confirmed success without To recap:
|
Related to this - when creating a user with public_key_contents and admin:false, the resulting command is incorrect:
IOS/XR wants the non-admin case to be The module will successfully copy the key into
This variant of the command can not succeed - the command pattern In non-admin scope:
In admin scope:
.. after which the key is imported. I think that this implies that the module can only ever import an sshkey if it specifies |
Current state of this bugreport:
|
A workaround is to have two tasks, one to create the user (in non-admin) and then one to set the sshkey (in admin):
|
Good day, @ashwini-mhatre @pimvanpelt Seems to be some other problems aswell: When trying to purge all users except admin it does not work in the admin space: - name: configure_cisco.iosxr.iosxr | Purge all users except admin in admin scope.
cisco.iosxr.iosxr_user:
purge: true
admin: true It says okey, but no users are removed: ok: [9K1] => changed=false
commands: []
invocation:
module_args:
admin: true
aggregate: null
configured_password: null
group: null
groups: null
name: null
public_key: null
public_key_contents: null
purge: true
state: present
update_password: always Root user is still there: RP/0/RSP0/CPU0:9K1#admin show run username
Mon Oct 23 12:56:09.722 CET
username root
group root-system
secret 5 ....
!
username admin
group root-system
secret 5 ....
! When doing it without admin: true it works, but only for standard scope. Also when creating users it fails, I've tried all kinds of ways to play this tasks, but fails like this: The full traceback is:
File "/Users/jorgenspange/.ansible/collections/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/iosxr.py", line 467, in load_config
response = conn.edit_config(
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ansible/8.5.0_1/libexec/lib/python3.11/site-packages/ansible/module_utils/connection.py", line 200, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [9K1]: FAILED! => changed=false
invocation:
module_args:
admin: false
aggregate:
- admin: true
configured_password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
group: root-system
groups: null
name: admin
public_key: null
public_key_contents: null
state: present
update_password: on_create
configured_password: null
group: null
groups: null
name: null
public_key: null
public_key_contents: null
purge: false
state: present
update_password: always
msg: |-
commit show-error
% Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. - name: configure_cisco.iosxr.iosxr | Configure local admin user in admin scope.
cisco.iosxr.iosxr_user:
aggregate:
- name: admin
admin: true
update_password: on_create
group: root-system
configured_password: "{{ user_admin_password }}"
state: present Best regards |
SUMMARY
Is cisco.iosxr.iosxr_user meant to work on old IOS/XR versions? Notably:
The former is an IOS XRv instance that I am developing on, and the latter are ASR9001/9006/9010 running in production at 5.3 version. Upgrading them is difficult due to older RSP/linecard combos.
Calling something like:
Will return:
Using
network_cli
transport also fails:ISSUE TYPE
COMPONENT NAME
Component is
iosxr_user
.ANSIBLE VERSION
The text was updated successfully, but these errors were encountered: