I am trying to use Ansible playbooks to run a multi-arch cluster. Now, to do that I need to make arch specific decisions. Is there any ansible module that can help me do that? Or is there any way where I can know the arch and use that in "when" conditional statement?
Asked
Active
Viewed 158 times
1 Answers
3
Use the debug
module to display your targets' facts and select the one that suits you best for your conditionals.
ansible_architecture
for a start. ansible_os_family
, ansible_distribution
... Whatever works for you.

techraf
- 64,883
- 27
- 193
- 198
-
Thanks for the quick response. Any idea what is the difference between ansible_architecture and ansbile_machine, they both look similar and confusing at the same time! – Pensu Mar 21 '17 at 07:20
-
1The code is not secret https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/facts.py – techraf Mar 21 '17 at 07:22
-
Got it! Can do that. – Pensu Mar 21 '17 at 09:06