ansible-collections / cisco.nxos

Ansible Network Collection for Cisco NXOS
GNU General Public License v3.0
115 stars 109 forks source link

cisco.nxos.nxos_user - Purge deletes users which does not exist, breaks idempotency #871

Open jorgenspange opened 3 months ago

jorgenspange commented 3 months ago

For fetching existing users the module runs "show user-account", this command displays users which does not exist, only have been logged in through SSH:

user:sshuser
        roles:network-admin vdc-admin
account created through REMOTE authentication
Credentials such as ssh server key will be cached temporarily only for this user account
Local login not possible

This makes the module try to delete these which are breaking idempotency as they are not present anywhere in the configuration.

The module also deletes users which is defined for snmp, which is more understandable, but still unfortunate.