Created at:

Modified at:

Ansible notes

Using ansible 2.10.7.

General tips

Generating a new vault

Ansible guide: vault

As simple as:

$ ansible-vault encrypt_string

If you don't want to type vault password, you may pass the --vault-password-file filepath flag, or use the ANSIBLE_VAULT_PASSWORD_FILE environment variable:

$ echo -n password | ansible-vault encrypt_string

Debugging a variable

Just define a task like this:

- debug: var=variable_name

Running a playbook in Dry Run mode

Just append the -C flag:

$ ansible-playbook -C ...