[ansible-project] Re: Find module results not returning as expected

2018-04-07 Thread flowerysong
On Saturday, April 7, 2018 at 8:50:44 AM UTC-4, Gabriel Forster wrote: > > Using the find module to find unknown files in a given directory and > register the results as a variable to be looped through later on. The debug > of the registered var shows a full on array of all kinds of attributes

[ansible-project] Find module results not returning as expected

2018-04-07 Thread Gabriel Forster
Using the find module to find unknown files in a given directory and register the results as a variable to be looped through later on. The debug of the registered var shows a full on array of all kinds of attributes about the files (way more than I want) - except the file name! It does show

[ansible-project] lxc connection plugin - sudo first?

2018-04-07 Thread Richard Hector
Hi all, I'm trying to use the lxc connection plugin, but it says that my container isn't running. Presumably that's because ansible isn't running as root. Is there a way to tell it to sudo before connecting? I'm aware of course of how to sudo _afterwards_, ie on the target system, to do anything

[ansible-project] [SOLVED] Re: How to load variables for a tagged role?

2018-04-07 Thread Karl Auer
Possibly bad form to reply to one's own query, but I think I worked it out. Rather than tag every task inside the role, I split the big role up into four. I removed ALL the tagging from inside the roles, and set up this little playbook: --- - hosts: localhost connection: local

[ansible-project] How to load variables for a tagged role?

2018-04-07 Thread Karl Auer
I have a large role, which I will break down into separate roles eventually. For the moment, I am trying to use tags to selectively run bits of it, tagged e.g. "server", "portal" etc. The role is called from this playbook: --- - hosts: localhost connection: local gather_facts: false