in Technology by
How to keep data secret in a Ansible playbook?

1 Answer

0 votes
by

If a situation arises where you need to keep secret data but at the same time share it publicly as well, use Vault in playbooks. However, if you’re using -v (verbose) mode and don’t want it to be seen by anyone, then you can use:

name: secret task

shell: /usr/bin/do_something --value={{ secret_value }}

no_log: True

Related questions

0 votes
    Which command tells ansible to run the playbook on all the hosts except host1? (i)ansible-playbook playbooks/ ... ansible-playbook playbooks/PLAYBOOK_NAME.yml -limit 'all:!host1'...
asked Jan 25, 2023 in Technology by JackTerrance
0 votes
    A Playbook starts with three dots …. (1)False (2)True...
asked Jan 26, 2023 in Education by JackTerrance
0 votes
    How many modules are there in Ansible?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    How is Ansible upgraded?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    How does synchronize module works of an Ansible?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    How to use Ansible for creating encrypted files?...
asked Jan 28, 2023 in Technology by JackTerrance
0 votes
    How are CD and CI related to Ansible?...
asked Jan 28, 2023 in Technology by JackTerrance
0 votes
    What are the components of Ansible?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    What is Ansible pipelining?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    What is use of Ansible?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    What is a handler in Ansible?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    What is Tag in Ansible?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    In the context of Ansible, what is meant by “facts”?...
asked Jan 28, 2023 in Technology by JackTerrance
0 votes
    What is Ansible Galaxy?...
asked Jan 28, 2023 in Technology by JackTerrance
0 votes
    What is idempotency in Ansible?...
asked Jan 28, 2023 in Technology by JackTerrance
...