I'm trying to write my first Ansible module. How do I refer to the built-in
facts that Ansible gathers during the setup phase? I just want to be able
to do this inside my module, for example.I want to be able to do the "when"
part in my module.
- name: Issue some command
command: ls -al /tmp
when: (ansible_product_version | search(".*.amazon"))
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/cdf6ad86-6624-45dc-b987-827c780dd0fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.