← All Ansible Automation Flashcard Decks

Ansible Vault and Secrets Management Flashcards

6 cards from real Ansible Automation practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 Ansible Vault and Secrets Management flashcards as text
  1. What is the primary purpose of Ansible Vault?

    Answer: To encrypt sensitive data such as passwords, API keys, and certificates within Ansible files

    Ansible Vault encrypts sensitive content in files or individual strings, allowing secrets to be safely stored in version control.

  2. What command creates a new encrypted Ansible Vault file?

    Answer: ansible-vault create secrets.yml

    'ansible-vault create' opens an editor to create a new file that is encrypted on save.

  3. How do you run a playbook that uses Ansible Vault-encrypted files?

    Answer: ansible-playbook site.yml --ask-vault-pass

    '--ask-vault-pass' prompts for the vault password interactively at runtime, which is used to decrypt vault-protected content.

  4. What is the difference between encrypting an entire file with Ansible Vault versus using 'vault encrypted strings'?

    Answer: Encrypting entire files protects all content; vault encrypted strings (ansible-vault encrypt_string) encrypt individual values while the rest of the file remains readable

    Vault encrypted strings allow mixing encrypted and plaintext variables in a single file, improving readability while protecting only sensitive values.

  5. What is Ansible Vault's 'vault-id' feature used for?

    Answer: It allows multiple vault passwords to be used simultaneously, labeling which password decrypts which content

    Vault IDs enable multi-password scenarios, where different secrets can be encrypted with different passwords, useful for different environments or teams.

  6. How do you change the password on an existing Ansible Vault-encrypted file?

    Answer: ansible-vault rekey secrets.yml

    'ansible-vault rekey' changes the encryption password on an existing vault file, prompting for the current password and the new one.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. redhat.com — Score release, test delivery, renewal, score validity, exam information · verified Oct 2026
  2. docs.redhat.com — Fees, exam format, retake policy · verified Oct 2026