eos_user requires a second task to set variables such as privilege level and role. The first time the task runs it creates the user, but fails to set the extra variables
Expected the following output in EOS CLI: leaf1-DC2#show run sec automator username automator privilege 15 role network-admin nopassword username automator ssh-key ssh-rsa <key>
ACTUAL RESULTS
Playbook produces the following output on first execution:
SUMMARY
eos_user requires a second task to set variables such as privilege level and role. The first time the task runs it creates the user, but fails to set the extra variables
ISSUE TYPE
COMPONENT NAME
eos_user
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ansible running on CentOS VM:
Target OS is cEOS-lab:
STEPS TO REPRODUCE
Create new user using eos_user module, providing extra variables such as privilege level and role
EXPECTED RESULTS
Expected the following output in EOS CLI:
leaf1-DC2#show run sec automator username automator privilege 15 role network-admin nopassword username automator ssh-key ssh-rsa <key>
ACTUAL RESULTS
Playbook produces the following output on first execution:
https://gist.github.com/jorisc90/f808d51f86b87fde4194c937da267d45
Playbook produces the expected result when running the same task again:
https://gist.github.com/jorisc90/b00280bab3630c15093dae13413fe8cb