You can call them directly in your playbook On Thursday, July 29, 2021 at 9:21:49 AM UTC+5:30 [email protected] wrote:
> What are you looking for exactly? > > On Wed, 28 Jul 2021 at 20:22, Isaiah Banks <[email protected]> wrote: > >> Hello. I am new to Ansible. I am trying to figure out how I can filter a >> list of ansible_facts in a template and playbook and get the information I >> directly need. I am trying to do this with json_query() plugin. >> >> However, when I pass the ansible facts to the json_query() plugin in the >> playbook, it automatically strips out the keys. I am doing it like this: >> >> - name: Filter ansible facts >> debug: >> msg: "{{ ansible_facts | json_query('*') }}" >> >> This example is just so I can see what the plugin would return. I want to >> be able to query against the keys, then after that return the value of that >> key. >> >> Thanks in advance. >> >> -- >> 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 view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/81cf407d-2f3a-439b-9875-d5e8b53776e5n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/81cf407d-2f3a-439b-9875-d5e8b53776e5n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > Sent from a mobile device - please excuse the brevity, spelling and > punctuation. > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/62adf6df-12ef-4b83-ba24-199d64f9028bn%40googlegroups.com.
