Open SadFaceSmith opened 5 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @davidobrien1985 click here for bot help
Have same issues. With encrypted ansible_become_pass receiving error: fatal: [node1]: FAILED! => {"msg": "Incorrect sudo password"}
Everything works with plaintext ansible_become_pass.
I have the same as @Smithe2413 but my vaulted passwords are in group_vars/*/vault.yml files.
Rolling back to 2.8.6 as it works fine.
I have the same as @Smithe2413 but my vaulted passwords are in group_vars/*/vault.yml files.
Rolling back to 2.8.6 as it works fine.
I have found the same and reverted to 2.8.6 to fix the issue. Vaulted p/w stored individually in host_vars/$hostname.yaml. Example of failing playbook:
---
- hosts: "{{ host | default('all') }}"
remote_user: root
become: true
tasks:
- name: Checking for ping
ping:
Files identified in the description:
lib/ansible/cli/vault.py
lib/ansible/modules/system/gather_facts.py
lib/ansible/modules/system/setup.py
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
SUMMARY
When
gather_facts
is enabled in a playbook that has a vaulted sudo password, the gather_facts tasks fails. Ad hoc setup module commands with-K b -k
work ( but not with the below playbook, even when all vault/become sections are commented out)ISSUE TYPE
COMPONENT NAME
gather_facts setup ansible vault
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Control host: RHEL 7.6 Target System: RHEL 7.6
STEPS TO REPRODUCE
Create playbook with vaulted
ansible_become_pass
andgather_facts: True
EXPECTED RESULTS
gather_facts runs to populate host vars. Then roles are imported and ran.
ACTUAL RESULTS
inventory is parsed. Ansible ssh login is performed, but sudo fails with 'incorrect sudo password'
/var/log/secure on the target system shows "incorrect password attempt" (authentication failure)
When
gather_facts
is set toFalse
, roles that requiresudo
run w/o issue.manual ssh and sudo -i to target host works. ansible_error.txt