NS0-402 practice question 1 of 15
You are writing an Ansible playbook and using the official NetApp modules. You must provide credentials for a NetApp ONTAP cluster in a secure manner. Which two actions should be used to accomplish this task? (Choose two.)
Full set: 58 questionsTo securely manage credentials for a NetApp ONTAP cluster in an Ansible playbook, the recommended methods are using Ansible Vault or interactive prompts. Ansible Vault allows for the encryption of sensitive data, such as passwords, within variable files. These credentials are encrypted at rest and are only decrypted in memory during playbook execution. Alternatively, using an interactive prompt (varsprompt) allows the user to enter the password at runtime. This method is also secure because the password is not stored on disk in any form (e.g., in the playbook, variable files, or shell history). Both methods prevent the exposure of credentials in plain text.
A. Pass the value as an argument on the command line. This is insecure because command-line arguments can be exposed in the process list and are often saved in the shell's history file.
C. Pass the value within the playbook itself. This is highly insecure as it involves storing credentials in plain text, making them visible to anyone with access to the playbook file or its version control history.
1. NetApp, "TR-4733: Ansible and ONTAP Best Practices," December 2021.
Section 3.2, "Managing credentials," Page 10: "Do not store credentials in plain text in your playbooks or roles. Instead, use Ansible Vault to encrypt sensitive data. You can also use environment variables or interactive prompts to provide credentials at runtime." This directly supports using Ansible Vault (B) and interactive prompts (D) while advising against storing credentials in plain text (C).
2. Ansible Documentation, "Keeping secrets safe in Ansible."
Section: "Encrypting content with Ansible Vault": "To protect sensitive data, you should use Ansible Vault. Ansible Vault can encrypt any structured data file used by Ansible." This validates Ansible Vault (B) as the primary secure method.
Section: "Prompting for passwords": "If you need to ask for a password, you can do it interactively with varsprompt." This validates interactive input (D) as a secure alternative.
Section: "Avoiding secret exposure": The documentation warns that passing secrets via --extra-vars (A) can be logged and is therefore insecure.
Keep practicing
Take the free NS0-402 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other NS0-402 practice questions
- Question 2You have deployed your application to an NKS cluster in your on-premises environment with…
- Question 4You must have a firewall adjusted to allow Ansible to work with ONTAP and Element softwar…
- Question 5You are sending API commands to NetApp Cloud Manager. In this scenario, which type of aut…
- Question 6After a ransomware attack, you are asked to block known ransomware file extensions and to…
- Question 7A customer has a legal requirement to hold data that has a 30-year retention period. The …
- Question 8You are currently working as an infrastructure administrator. Your business is undergoing…
