Can you share your secret.yml file please? I'm not 100% sure without seeing, but based on my experience with that error, the password was placed in the file in PLAINTEXT instead of as a hash which will require that module to fail.
--- Travis
Can you share your secret.yml file please? I'm not 100% sure without seeing, but based on my experience with that error, the password was placed in the file in PLAINTEXT instead of as a hash which will require that module to fail.
--- Travis
Travis,
I don't have the file since it was created in a netlab pod but I know I didn't encrypt the password so I think your solution is 100% correct.
Thanks,
Dennis
@dennisk -
I know it probably doesn't help a lot now, but please feel free to look at my Github pages. I typically do some demos when I teach the course and for Ansible, I shared the playbooks on Github.
https://github.com/tmichett/RH294/tree/master/Ansible_Playbooks/Chapter4/data-secret
In this instance, I have the secret file listed there directly.
To explain things a little bit further ...
https://docs.ansible.com/ansible/2.8/modules/user_module.html?highlight=user
There are also other methods of doing this ... I'm assuming you were in the DO407 or the RH294 course performing a Vault lab for managing secrets. There is another Advanced Ansible course DO447: https://www.redhat.com/en/services/training/do447-advanced-automation-ansible-best-practices that dives into Ansible deeper mentioning proper version control with git and discusses usage of filters, etc.
In that course you learn things like ...
user: name: "{{ item }}" password: "{{ password | password_hash('sha512') }}"
update_password: on_create
Thanks Travis. Checking with some else at the college who is also working on this, there seems to be some typos in the lab.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.