$ ansible-playbook --version
ansible-playbook 2.9.18
config file = /home/CGE/sa_cge_sm/projects/tavs-patching/ansible.cfg
configured module search path = [u'/home/CGE/sa_cge_sm/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible-playbook
python version = 2.7.5 (default, Aug 13 2020, 02:51:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Created user.yml via ansible-vault:
$ ansible-vault create user.yml
New Vault password: <password entered>
Confirm New Vault password: <password entered>
sent into vi, and entered password. Saved file. It appears the encryption is performed properly
]$ cat user.yml
$ANSIBLE_VAULT;1.1;AES256
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Possibly user-error here (relatively new to ansible). When I run playbook:
$ ansible-playbook redhatpatching.yml -i dfwtesting.yml -l dfwtesting -f 5 -u sa_cge_sm --vault-password-file ./user.yml -k
SSH password:
[WARNING]: Error in vault password file loading (default): A vault password must be specified to decrypt data
ERROR! A vault password must be specified to decrypt data
Isn't ansible-vault designed to not require a password to be entered?
Thanks!
I believe that when encrypting a password vault you need to run with –ask-vault-password
Rene
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ansible-proje...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/0522d4db-06c7-427e-8a1f-4bed98074a85n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/nhpP1jWvjZE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/YTXPR0101MB1295A059F8D70CC954351435D85F9%40YTXPR0101MB1295.CANPRD01.PROD.OUTLOOK.COM.
Can you show us the contents of your playbook?
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFQW1uPhxEyZEi83G_E0NPzT2DyVQs%2BqNVcqZ6%3DmHZHGVu6_HQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/YTXPR0101MB1295E2C6E7E6BF44038A4079D85F9%40YTXPR0101MB1295.CANPRD01.PROD.OUTLOOK.COM.
I am no expert but in my playbooks I point to my files that holds variables and passwords
- hosts: localhost
gather_facts: no
vars_files:
- group_vars/vars
- group_vars/vars_sec
tasks:
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFQW1uPM0TefJhRSo%2BTL38EcUyj%2BD-bzv-hyoWHdD%2BP9POj0vQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/YTXPR0101MB12959C92CE73A85A0B777A77D85F9%40YTXPR0101MB1295.CANPRD01.PROD.OUTLOOK.COM.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/nhpP1jWvjZE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/89483cc8-aa0e-877f-f94f-1f676fa0a19e%40linuxia.de.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/nhpP1jWvjZE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5233bf3f-b5a4-4d4e-6ff9-c4915b5528eb%40linuxia.de.
The solution was under Configureà “Invoke Ansible Playbook”à”Vault Credentials”. Click “Add” which brings up Jenkins Credentials Provider: Jenkins. Click “Kind” and select “Secret text” from the pull-down. Enter the password at Secret, leave ID (it will be auto-generated) and a description, then Add.
worked like a champ!
Thanks all!