Encrypt a variable with Vault ansible
Inline-encrypt a value for use in playbook vars
ansible-vault encrypt_string 'supersecret' --name 'db_password'
more ansible
all 56 commands →
Decrypt vault file
ansible-vault view group_vars/all/vault.yml
Copy file to remote
ansible all -m copy -a 'src=./nginx.conf dest=/etc/nginx/nginx.conf owner=root mode=0644' -i inventory.ini
Restart service on all hosts
ansible webservers -m service -a 'name=nginx state=restarted' -b -i inventory.ini
Show inventory graph
ansible-inventory -i inventory.ini --graph
Test role locally with Molecule
molecule test -s default