On this page you find all important commands for the CLI tool ansible-vault. If the
command you are looking for is missing please ask our AI.
ansible-vault
can encrypt any structured data file used by Ansible. This can include group_vars/ or host_vars/ inventory variables, variables loaded by include_vars or vars_files, or variable files passed on the ansible-playbook command line with -e @file.yml or -e @file.json. Role variables and defaults are also included!
List of commands for ansible-vault:
-
ansible-vault:tldr:1d55b ansible-vault: Encrypt a string using Ansible's encrypted string format, displaying interactive prompts.$ ansible-vault encrypt_stringtry on your machineexplain this command
-
ansible-vault:tldr:39b00 ansible-vault: Encrypt an existing file using an optional password file.$ ansible-vault encrypt --vault-password-file=${password_file} ${vault_file}try on your machineexplain this command
-
ansible-vault:tldr:6150a ansible-vault: Create a new encrypted vault file using a vault key file to encrypt it.$ ansible-vault create --vault-password-file=${password_file} ${vault_file}try on your machineexplain this command
-
ansible-vault:tldr:7a541 ansible-vault: Re-key already encrypted vault file with a new password file.$ ansible-vault rekey --vault-password-file=${old_password_file} --new-vault-password-file=${new_password_file} ${vault_file}try on your machineexplain this command
-
ansible-vault:tldr:a6897 ansible-vault: View an encrypted file, using a password file to decrypt.$ ansible-vault view --vault-password-file=${password_file} ${vault_file}try on your machineexplain this command
-
ansible-vault:tldr:ebcaa ansible-vault: Create a new encrypted vault file with a prompt for a password.$ ansible-vault create ${vault_file}try on your machineexplain this command