Hi,

On Wed, Apr 04, 2018 at 02:56:39PM -0700, flowerysong wrote:
> On Wednesday, April 4, 2018 at 4:43:14 PM UTC-4, Andy Smith wrote:
> >     https://gist.github.com/grifferz/a505e352baa18e06ba1ba1d02a123ee2 
> >
> > This works, but have I missed something which allows this to be done 
> > in a more elegant way? 
> 
> Building the list of missing files doesn't need to be a multi-step process 
> or involve an Ansible loop. I would preserve the ordering in the generated 
> file instead of splitting it into two lists, so that someone manually 
> adding a file and uncommenting its line creates the same state as 
> re-templating the file.
> 
> So, something like 
> this: https://gist.github.com/flowerysong/d6c5b16123473279c025fe8d34c20bd6

Excellent, thank you! Some new concepts for me there.

I had to add a "set_fact:" between lines 15 and 16 to get this to
pass syntax check, but I assume this was just a typo (Ansible
2.4.3.0).

Cheers,
Andy

-- 
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/20180406030223.GD4569%40bitfolk.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to