# Help with securing password

**URL:** <https://forum.ansible.com/t/help-with-securing-password/28178>\
**Category:** Ansible Project\
**Created:** [July 27, 2018, 2:03pm UTC](https://forum.ansible.com/t/help-with-securing-password/28178 "2018-07-27T14:03:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phil\_Brady](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@Phil\_Brady](https://forum.ansible.com/u/Phil_Brady)\
**Post date:** [July 27, 2018, 2:03pm UTC](https://forum.ansible.com/t/help-with-securing-password/28178/1 "2018-07-27T14:03:24Z")

</div>

Hi,

Can someone help me with the below please?

I have a role with the following task in

roles/passwd/tasks/main.yml

- name: Change user1 password  
user: name=user1 update\_password=always password={{ user1\_password }}

I have this variable in my group vars

inventories/reporting/all.yml

user1\_password: “{{ ‘user1passwd’ | password\_hash(‘sha512’) }}”

1. The task runs without issue but if I try to login with user1 and user1passwd it does not work

2. I want to move the var out of all.yml and into a vault but I am not sure how ansible will find the password if its not in all.yml?

Thanks,

Phil

---

<div class="post-metadata">

**Author:** ![dan\_linder](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dan_linder/32/3833_2.png) [@dan\_linder](https://forum.ansible.com/u/dan_linder)\
**Post date:** [July 28, 2018, 9:00pm UTC](https://forum.ansible.com/t/help-with-securing-password/28178/2 "2018-07-28T21:00:04Z")

</div>

Can you provide more details on the “does not work” when you login. If the playbook does report that it changed it (or on the second run reports “ok”), then as far as Ansible can tell it’s set. There might be something on your system denying the login.

On my Fedora 28 workstation with Ansible 2.6.1 this playbook called “pwd.yml”:
