Re: [ansible-project] Print output of multiple host in a single file

2021-06-03 Thread R.B. Kumar
Thank you.  I will try today and get back. 

On Wednesday, June 2, 2021 at 11:35:46 PM UTC+5:30 dmc...@gmail.com wrote:

> Have you tried Ansibledb? It seems a waste to only get one piece of 
> information.
>
> AnsibleDB can take in the output of the setup module and store it so you 
> can just run curl commands against the API and pull out the version you're 
> after from all your cisco routers at once. in your case, you'd need to pull 
> down (probably)this collection: 
> https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_facts_module.html
>
> Once it's set up, you can query ansibleDB for any other facts you want.
>
> AnsibleDB setup role: https://github.com/apidb-io/setup_ansibledb
> OR AnsibleDB manual setup: 
> https://github.com/apidb-io/ansibledb_api_opensource
> Ansibledb_opensource ansible collection to collect the facts: 
> https://galaxy.ansible.com/apidb/ansibledb_opensource
>
> This is a meetup demo of the setup and usage of AnsibleDB but the focus is 
> Linux and Windows servers but with the right collection, it will require 
> minimal setup.
> https://youtu.be/1vLe7o0BooY
>
> I'd be happy to help with the setup.
> On Wednesday, 2 June 2021 at 17:39:23 UTC+1 seeku...@gmail.com wrote:
>
>> Thank you. Let me try and let you know 
>>
>> On Wednesday, June 2, 2021 at 6:01:50 PM UTC+5:30 navee...@gmail.com 
>> wrote:
>>
>>> May be u can use with_items module.
>>>
>>> On Wed, Jun 2, 2021, 17:52 R.B. Kumar  wrote:
>>>
 Hello All - Some basics. I have 50+ Cisco Routers. I am running a 
 ansible script to execute "show version" command. The script works well.  
 I 
 am copying the output to a file 

 But every host creates one file so, i end up having 50+ files with the 
 output. Can i write the output of all the host in a single file? Thanks

 regards, RB.

 -- 
 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 ansible-proje...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/ansible-project/19f9cd6d-bf7f-46b4-a2a6-c108d2c02131n%40googlegroups.com
  
 
 .

>>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c042593a-a636-4e9f-83f3-cc6d95d466afn%40googlegroups.com.


Re: [ansible-project] Print output of multiple host in a single file

2021-06-02 Thread dmc...@gmail.com
Have you tried Ansibledb? It seems a waste to only get one piece of 
information.

AnsibleDB can take in the output of the setup module and store it so you 
can just run curl commands against the API and pull out the version you're 
after from all your cisco routers at once. in your case, you'd need to pull 
down (probably)this 
collection: 
https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_facts_module.html

Once it's set up, you can query ansibleDB for any other facts you want.

AnsibleDB setup role: https://github.com/apidb-io/setup_ansibledb
OR AnsibleDB manual 
setup: https://github.com/apidb-io/ansibledb_api_opensource
Ansibledb_opensource ansible collection to collect the 
facts: https://galaxy.ansible.com/apidb/ansibledb_opensource

This is a meetup demo of the setup and usage of AnsibleDB but the focus is 
Linux and Windows servers but with the right collection, it will require 
minimal setup.
https://youtu.be/1vLe7o0BooY

I'd be happy to help with the setup.
On Wednesday, 2 June 2021 at 17:39:23 UTC+1 seeku...@gmail.com wrote:

> Thank you. Let me try and let you know 
>
> On Wednesday, June 2, 2021 at 6:01:50 PM UTC+5:30 navee...@gmail.com 
> wrote:
>
>> May be u can use with_items module.
>>
>> On Wed, Jun 2, 2021, 17:52 R.B. Kumar  wrote:
>>
>>> Hello All - Some basics. I have 50+ Cisco Routers. I am running a 
>>> ansible script to execute "show version" command. The script works well.  I 
>>> am copying the output to a file 
>>>
>>> But every host creates one file so, i end up having 50+ files with the 
>>> output. Can i write the output of all the host in a single file? Thanks
>>>
>>> regards, RB.
>>>
>>> -- 
>>> 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 ansible-proje...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/19f9cd6d-bf7f-46b4-a2a6-c108d2c02131n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ab6e962c-582e-403e-9c4a-0e33d671a834n%40googlegroups.com.


Re: [ansible-project] Print output of multiple host in a single file

2021-06-02 Thread R.B. Kumar
Thank you. Let me try and let you know 

On Wednesday, June 2, 2021 at 6:01:50 PM UTC+5:30 navee...@gmail.com wrote:

> May be u can use with_items module.
>
> On Wed, Jun 2, 2021, 17:52 R.B. Kumar  wrote:
>
>> Hello All - Some basics. I have 50+ Cisco Routers. I am running a ansible 
>> script to execute "show version" command. The script works well.  I am 
>> copying the output to a file 
>>
>> But every host creates one file so, i end up having 50+ files with the 
>> output. Can i write the output of all the host in a single file? Thanks
>>
>> regards, RB.
>>
>> -- 
>> 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 ansible-proje...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/19f9cd6d-bf7f-46b4-a2a6-c108d2c02131n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ebf77db1-06b6-4776-9ef1-70d7972cdaban%40googlegroups.com.


Re: [ansible-project] Print output of multiple host in a single file

2021-06-02 Thread NAVEEN
May be u can use with_items module.

On Wed, Jun 2, 2021, 17:52 R.B. Kumar  wrote:

> Hello All - Some basics. I have 50+ Cisco Routers. I am running a ansible
> script to execute "show version" command. The script works well.  I am
> copying the output to a file
>
> But every host creates one file so, i end up having 50+ files with the
> output. Can i write the output of all the host in a single file? Thanks
>
> regards, RB.
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/19f9cd6d-bf7f-46b4-a2a6-c108d2c02131n%40googlegroups.com
> 
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAB_%3D4oZre1gr4_eGAdgTYorOyvVg_Jhb1Ht4pshhNQP-yYxzwQ%40mail.gmail.com.