Well, fetch is used to gather files from a remote host and put them on the
local one.

Usually filing up the roles directory would be a non-standard place to put
things, and would probably result in data accidentally going into source
control, and that content should drop outside of your playbook directly.

I'd suggest downloading to a specific path, but more so, that you probably
shouldn't be redistributing known hosts by trusting one of your nodes, as
nodes should be by very nature untrustworthy, and something centrally
managed.

My two cents anyway, unrelated to the above.

I think changing the path would break playbooks.





On Wed, May 28, 2014 at 6:58 AM, Joost Cassee <[email protected]> wrote:

> By the way, in the mean time I hacked around the problem by creating a
> custom lookup plugin:
>
> class LookupModule(object):
>
>     def __init__(self, basedir=None, **kwargs):
>         self.basedir = basedir
>
>     def run(self, terms=None, inject=None, **kwargs):
>         return [self.basedir]
>
> I'm not proud of myself. :-)
>
> Regards,
> Joost
>
> 2014-05-28 12:43 GMT+02:00 Joost Cassee <[email protected]>:
> > Hi all,
> >
> > I am using the fetch module in a role that redistributes ssh_known_hosts
> by:
> > 1) creating a snippet on every host
> > 2) fetching those snippets
> > 3) redistributing the concatenation
> >
> > I wanted to keep the snippets inside the files directory of the role, but
> > the fetch module fetches does not use that directory as the basedir.
> >
> > My two question:
> > 1) Is this expected behavior? (I see how this makes sense.)
> > 2) If so, can I find the role basedir somehow so I can put the snippets
> in
> > the role files directory?
> >
> > Regards,
> > Joost
> >
> > --
> > You received this message because you are subscribed to a topic in the
> > Google Groups "Ansible Project" group.
> > To unsubscribe from this topic, visit
> >
> https://groups.google.com/d/topic/ansible-project/TMWhxCPhL54/unsubscribe.
> > To unsubscribe from this group and all its topics, 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/1c87d249-3cbc-43d0-9875-e470400e0aaa%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Joost Cassee
> http://joost.cassee.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 [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/CAEQrH%2BdE3SfDnhLnx54zZfByqMN1_6phdrLBHTyFomgEAsEG%2Bg%40mail.gmail.com
> .
> 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%2BnsWgyP7Lv%2BVNpShZKhEybgYv0APL8nP5dC3VNj-62FJpOdsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to