Yes, you just need to call the setup module
<http://docs.ansible.com/ansible/setup_module.html> yourself (instead of
letting gather_facts call it for you) and pass fact_path to a location you
have control over. eg:
- hosts: myhosts
gather_facts: no
tasks:
# calling setup manually will still store all the facts normally
- setup:
fact_path: /home/me/myfacts
- shell: echo "do stuff"
-Matt
On Monday, April 18, 2016 at 7:45:17 AM UTC-7, Uwe Bartels wrote:
>
> Hiho,
>
> I'm currently working with most recent ansible in a very restricted system
> environment, e.g. I don't have root access.
>
> now I'm gathering data via shell commands and register.
> E.g.
> - name: check for java installation
> shell: ls {{ installdir }}
> register: installdircontent
>
> I'd like to gather information via facts, because the "PLAY RECAP" shows
> "changed=xx", but I'm only collecting information and don't change, when
> everything is fine.
>
> custom facts can only placed in /etc/ansible/fact.d as described in the
> docs.
> Is there any possibility to gather facts with non-root permissions?
>
> Best Regards,
> Uwe
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/0a797b51-3946-42b9-a45b-47ad607de31c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.