I have been reading some docs on the Junipernetworks.junos collection, here is the section for the .junos_user module
junipernetworks.junos.junos_user module - Manage local user accounts on Juniper JUNOS devices - Ansible Community Documentation
I have this playbook
---
- name: Change User Password
hosts: test
gather_facts: no
connection: netconf
vars_files:
- ../Credentials/credentials.yml
tasks:
- name: Change User Password
junipernetworks.junos.junos_user:
name: NewUser
role: super-user
encrypted_password: "{{ 'test123' | password_hash('sha512') }}"
state: present
That playbook works perfectly fine,
Im trying to figure out how to change the root user password
I have tried this,
---
- name: Change User Password
hosts: test
gather_facts: no
connection: netconf
vars_files:
- ../Credentials/credentials.yml
tasks:
- name: Change User Password
junipernetworks.junos.junos_user:
name: root
encrypted_password: "{{ 'test123' | password_hash('sha512') }}"
state: present
i keep getting this error:
fatal: [test]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"active": true,
"aggregate": null,
"encrypted_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"full_name": null,
"name": "root",
"purge": false,
"role": null,
"sshkey": null,
"state": "present"
}
},
I have been researching all day on a way to do this and every soultion i try gives me errors, any help would be greatly appreciated.
------------------------------
JORDAN ATHERTON
------------------------------