300-610 · Question #183
An engineer needs to configure multiple network devices using Ansible Device passwords must meet these requirements: - be stored securely - not be visible as plaintext - be available to Ansible playbo
The correct answer is A. Encrypt a password variable file using Ansible Vault.. To securely store and use sensitive passwords in Ansible playbooks without exposing them in plaintext, an engineer should encrypt a password variable file using Ansible Vault.
Question
An engineer needs to configure multiple network devices using Ansible Device passwords must meet these requirements:
- be stored securely
- not be visible as plaintext
- be available to Ansible playbooks for executing scripts
Which solution must the engineer choose?
Options
- AEncrypt a password variable file using Ansible Vault.
- BStore the passwords within a Git repository Secrets Manager
- CEncrypt passwords as Ansible environment variables
- DEncrypt the passwords within the Ansible inventory file.
How the community answered
(49 responses)- A86% (42)
- B4% (2)
- C8% (4)
- D2% (1)
Why each option
To securely store and use sensitive passwords in Ansible playbooks without exposing them in plaintext, an engineer should encrypt a password variable file using Ansible Vault.
Ansible Vault is specifically designed to encrypt sensitive data, such as passwords, API keys, and other secrets, within Ansible variable files. This ensures that the passwords are stored securely, are not visible in plaintext in version control, and can be decrypted on demand by Ansible playbooks for execution.
Storing passwords in a Git repository, even with a secrets manager, might still expose them if the secrets manager's configuration or access is compromised, and it's not the native, integrated solution for Ansible's secure secret management.
Encrypting passwords as Ansible environment variables is not a standard or secure practice for long-term storage or management of secrets in Ansible, as environment variables can be susceptible to exposure and are not designed for robust encryption and decryption within playbooks.
Encrypting the passwords directly within the Ansible inventory file is not the recommended or secure method; Ansible Vault is intended for separate variable files to manage sensitive data, keeping the inventory file clean and focused on host definitions.
Concept tested: Ansible Vault for secret management
Source: https://docs.ansible.com/ansible/latest/user_guide/vault.html
Topics
Community Discussion
No community discussion yet for this question.