"My custom facts scripts are of course not executed when ansible is gathering facts. "
I'm confused about this, do you mean "facts.d" facts? If you are writing local facts they would in fact be gathered when you are gathering facts. It seems you might be calling your own facts module and named it "setup", which you should not do, really, but I'm unclear if you did. You can also set "sudo: True" at play level. It may be that you want to write a "my_facts" module instead, unless you have a specific need for facts.d. Let me know a bit more info and we'll get closer to the answer. Thanks! On Wed, Sep 10, 2014 at 12:08 PM, ProfHase <[email protected]> wrote: > I ' ve written some custom facts that require sudo to be executed (Those > are scripts that parse some files in /etc/) . > > My custom facts scripts are of course not executed when ansible is > gathering facts. On the other hand I need the facts gathered as ansible > user. > My workaround for this is now: > > - name: retrieve nonsudo facts > setup: > register: nsfacts > > - name: retr. sudo facts > setup: > sudo: yes > > > Is there a feature to cover this problem? Maybe some way to tell ansible > to complete nonsudo facts by sudo facts? > > Thanks > > -- > 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/bdf5c95e-65ae-4bfc-ab6b-cada3d54c138%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/bdf5c95e-65ae-4bfc-ab6b-cada3d54c138%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgyt_o8%2B2XMSYJFWAoo%3DQU0b_F%2BrZ78Va2cvCwMCiHVs-g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
