# ansible-playbook -i inventory.ini playbook.yml [WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details ERROR! Attempting to decrypt but no vault secrets found
# ansible-playbook --ask-vault-pass -i inventory.ini playbook.yml Vault password: [WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details PLAY [Basic tasks] ************************************************************* TASK [Gathering Facts] ********************************************************* ok: [127.0.0.1] TASK [Execute uptime command] ************************************************** changed: [127.0.0.1] TASK [debug] ******************************************************************* ok: [127.0.0.1] => { "uptime_result.stdout_lines": [ " 12:08:41 up 57 days, 16:32, 1 user, load average: 1.00, 0.46, 0.33" ] } PLAY RECAP ********************************************************************* 127.0.0.1 : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Использование файла паролей
# echo '111' > /etc/.ansible_vault_pass
# ansible-playbook --vault-password-file=/etc/.ansible_vault_pass -i inventory.ini playbook.yml [WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details PLAY [Basic tasks] ************************************************************* TASK [Gathering Facts] ********************************************************* ok: [127.0.0.1] TASK [Execute uptime command] ************************************************** changed: [127.0.0.1] TASK [debug] ******************************************************************* ok: [127.0.0.1] => { "uptime_result.stdout_lines": [ " 12:08:41 up 57 days, 16:32, 1 user, load average: 1.00, 0.46, 0.33" ] } PLAY RECAP ********************************************************************* 127.0.0.1 : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0