Re: Fwd: [ansible-project] help on windows gather facts

21 views
Skip to first unread message

Anitha sreejith

unread,
Nov 12, 2020, 10:19:21 AM11/12/20
to ansible...@googlegroups.com
Hi Anthony,

I am trying to create custom fact like below. But setup module during playbook execution gets hung.

What I am missing here. Please help.

I have attached Screenshort below.

The task "Gather custom facts" gets hunged and not moving forward.

Thanks,

On Thu, 12 Nov 2020, 02:01 Antony Stone, <Antony...@ansible.open.source.it> wrote:
On Wednesday 11 November 2020 at 21:27:21, Anitha sreejith wrote:

> Hello all,
>
> I tried to create basic playbook to collect all windows facts. I could ping
> the server well but "ansible_facts" is not giving me any info. I end up
> with error.

What is the error?

> Whereas when I run ad hoc command using setup module I could see beautiful
> windows facts in Jason format.

What is the command?

> What is the issue when the same kind of output is expected from playbook.

Can you show us the playbook?

> Can anyone help please?

We need more information about exactly what you are doing and exactly what the
result is.


Antony.
20201112_204540.jpg

Jerin J

unread,
Nov 12, 2020, 10:21:52 AM11/12/20
to ansible...@googlegroups.com
May be its looking for Ansible facts path .. can you configure fact_path = C:\\temp in ansible.cfg ?

--
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/CADU-23t1bEHLsgtYzN554e0_mwOOgtmM2wmV5HOX_-dxRrr68w%40mail.gmail.com.

Anitha sreejith

unread,
Nov 12, 2020, 10:44:36 AM11/12/20
to ansible...@googlegroups.com
Hi Jerin,

I tried and when we do that change in /etc/ansible/ansible.cfg the first ever default gather facts gets affected and end up with error.

I have also tried with ad-hoc command

#ansible host group -m setup -a "fact_path=c://Development" it gets hunged.

Any help would be appreciated.

Thanks

Jerin J

unread,
Nov 12, 2020, 10:49:29 AM11/12/20
to ansible...@googlegroups.com
Hi Anitha , 
Its just a hung up or you getting any error ? If you getting error can you attach the same .. remove facts path in your play and just add it in ansible.cfg 

Anitha sreejith

unread,
Nov 15, 2020, 1:20:19 PM11/15/20
to ansible...@googlegroups.com
Hi,

Can anyone help with this? How to make setup gets run again in the middle after defining fact_path.

My managed node is a windows server.


Regards,
Anitha Sreejith 
Reply all
Reply to author
Forward
0 new messages