Re: [ansible-project] Re: facts to txt file

2021-03-26 Thread Marcio Xavier
Perfect !  I am so thankful for you helping guys ! Have a great weekend Marcio Xavier Em sex., 26 de mar. de 2021 às 12:46, Jorge Rúa escreveu: > Something like this could do the trick > > - name: Dump vars > hosts: all > connection: local > gather_facts: True > tasks: > -

Re: [ansible-project] Re: facts to txt file

2021-03-26 Thread Brian Coca
fact cache plugins can be used, the JSON one is particularly useful for this case. https://docs.ansible.com/ansible/latest/plugins/cache.html -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

Re: [ansible-project] Re: facts to txt file

2021-03-26 Thread Jorge Rúa
Something like this could do the trick - name: Dump vars hosts: all connection: local gather_facts: True tasks: - name: Dump hostvars delegate_to: localhost copy: content: "{{ hostvars[inventory_hostname] | to_nice_json }}" dest: /tmp/setup-{{

[ansible-project] Re: facts to txt file

2021-03-26 Thread Somasundaram R
use ansible-cmdb. https://ansible-cmdb.readthedocs.io/en/latest/#:~:text=Ansible%2Dcmdb%20takes%20the%20output,by%20Ansible%20with%20custom%20data. On Friday, 26 March 2021 at 21:01:48 UTC+5:30 mrcx...@gmail.com wrote: > Hi all > > Is there a way to store facts like (mem,CPU,HD etc ) to a txt