Re: [ansible-project] gather_facts: ansible_hostname only

2018-01-23 Thread Kai Stian Olstad
On Tuesday, 23 January 2018 19.09.06 CET John Harmon wrote:
> Thanks Matt.  It seems platform and !all,min equate to the same thing.  I 
> tried the following in my playbook and it works:
> 
>   pre_tasks:
> - setup:
> gather_subset: min
> filter: ansible_hostname

gather_subset is also allowed on the play[1] level.

- hosts: all
  gather_subset: min


[1] https://docs.ansible.com/ansible/latest/playbooks_keywords.html#play

-- 
Kai Stian Olstad

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8480417.tI9P22h2rz%40x1.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] gather_facts: ansible_hostname only

2018-01-23 Thread John Harmon
Thanks Matt.  It seems platform and !all,min equate to the same thing.  I 
tried the following in my playbook and it works:

  pre_tasks:
- setup:
gather_subset: min
filter: ansible_hostname



On Tuesday, January 23, 2018 at 10:59:23 AM UTC-7, Matt Martz wrote:
>
> The most minimal you can do, and still get that would be to define:
>
> gather_subset: platform
>
> It will include ansible_hostname, plus a few extras.
>
>
> On Tue, Jan 23, 2018 at 11:42 AM, John Harmon  > wrote:
>
>> Is there a way for me to specify the only fact I care about gathering?  I 
>> have a server that is giving me grief due to the way its disks are setup 
>> (tons of nfs shares, etc) at least I assume that is why it is giving me 
>> grief.  I just need to gather the ansible_hostname fact.
>>
>> -- 
>> 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 post to this group, send email to ansible...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/9dc29978-9cdf-4895-afbb-5da27bc9b4a5%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Matt Martz
> @sivel
> sivel.net
>

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f7549ba6-92b9-4048-bfd9-3389b06beea9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] gather_facts: ansible_hostname only

2018-01-23 Thread Matt Martz
The most minimal you can do, and still get that would be to define:

gather_subset: platform

It will include ansible_hostname, plus a few extras.


On Tue, Jan 23, 2018 at 11:42 AM, John Harmon 
wrote:

> Is there a way for me to specify the only fact I care about gathering?  I
> have a server that is giving me grief due to the way its disks are setup
> (tons of nfs shares, etc) at least I assume that is why it is giving me
> grief.  I just need to gather the ansible_hostname fact.
>
> --
> 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 post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/9dc29978-9cdf-4895-afbb-5da27bc9b4a5%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v_X6W2QkSwCoviN285s6tJ0vQFU%2BRS7TCstHMdOherUjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] gather_facts: ansible_hostname only

2018-01-23 Thread John Harmon
Is there a way for me to specify the only fact I care about gathering?  I 
have a server that is giving me grief due to the way its disks are setup 
(tons of nfs shares, etc) at least I assume that is why it is giving me 
grief.  I just need to gather the ansible_hostname fact.

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9dc29978-9cdf-4895-afbb-5da27bc9b4a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.