I have an inventory file with one host:
10.1.32.123 ansible_ssh_user=vagrant ansible_ssh_pass=vagrant
- hosts: all sudo: yes gather_facts: yes serial: 20 roles:
It's not the
yaml file I wish to password protect but my inventory file, since it contains user credentials. It's although not possible, as when I run the playbook, the content in the inventory file doesn't decrypt. It does if I have the
yaml file encrypted.
ansible-playbook inventory site.yml --ask-vault-pass
- Is there a way to add the credentials:
ansible_ssh_user=vagrant ansible_ssh_pass=vagrantto the
yamlfile and just keep the IP in the inventory file.