Answer Posted / Prashant Parashar
To access a list of ansible_variables, you can use the setup module in an Ansible playbook. By running the following command: - name: Display variables hosts: all tasks: - debug: var=ansible_facts.ansible_all_hosts
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is it unsafe to bulk-set task arguments from a variable?
How can I set the path or any other environment variable for a task or entire playbook?
Can you build your own modules with ansible?
What is ansible role and how are they different from the playbook?
What is ansible role?
How do I copy files recursively onto a target host?
How can one interpolate variables or dynamic variable names?
How to keep secret data in playbook?
Is ansible is an open source tool?
Where does the configuration file live and what can I configure in it?
Why is ‘{{ }}’ notation used?
What are the different components of ansible? Explain ansible architecture.
Write a playbook to create a backup of a file in the remote servers before copy.
Talk about ansible architecture.
Compare ansible vs puppet?