Re: [ansible-project] Using include_vars and with_items with optiona files == bug?

2017-07-10 Thread Brian Coca
Well, this is not include_vars behaviour but 'merge loop results
behaviour' that affects all modules as this is result processing.

The other part of 'saving intermediate results' would also affect all tasks.

I doubt either will change in the future.


--
Brian Coca

-- 
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/CACVha7f3UAwvxEN%2BYUdQYjS_PWnECwakpxh5_u0jwcHcuxygxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Using include_vars and with_items with optiona files == bug?

2017-07-10 Thread Dan Linder
I'm falling back to the six tasks for now (three stat file, three include 
when exists).

In my mind this is a bug; the "ignore_errors" setting should let it keep 
the partial result.  The parallel being that the file module could 
partially succeed in setting a file owner but SELinux or other methods 
could deny the setting of the file group.

But I'll agree to disagree with you on that point. :-)

I could see the addition of the "hash_behavior" as an argument to 
"include_vars" and let it have the option of "keep_partial" as an extension 
of merge (replace, merge, merge_partial).

On Monday, July 10, 2017 at 3:39:29 PM UTC-5, Brian Coca wrote:
>
> The merge setting will affect the result of the task, but not the 
> internal iterator of the task. 
>
> You might want to make this 3 tasks or use vars_files. 
>
>
> -- 
> -- 
> Brian Coca 
>

-- 
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/f586a8e2-1cab-48eb-a3ac-4f919b315979%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Using include_vars and with_items with optiona files == bug?

2017-07-10 Thread Brian Coca
The merge setting will affect the result of the task, but not the
internal iterator of the task.

You might want to make this 3 tasks or use vars_files.


-- 
--
Brian Coca

-- 
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/CACVha7ekYaeZPPJMRA%2BDSk2hTi9hNY7mx2bm%3DYkJyALkEmsE9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Using include_vars and with_items with optiona files == bug?

2017-07-10 Thread Dan Linder
I forgot to add that I've defined the hash_behaviour to "merge" just for 
this express purpose of keeping and stacking/appending variables so the 
normal behavior is suppose to be modified here.

On Monday, July 10, 2017 at 2:59:22 PM UTC-5, Brian Coca wrote:
>
> Well, when you include_vars you are normally overwriting existing 
> vars, this will happen in a with_ loop or outside of it, that is 
> normal behaviour. 
>
> As for the error wiping out myvars ... the task failed, so none of the 
> work was done. The previously accumulated data in the 2 files that did 
> work is lost as the task ends up not importing any vars as it failed 
> as a whole, even if parts of it succeeded. 
>
> -- 
> Brian Coca 
>

-- 
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/6e5f8d79-8c28-464d-b4b0-4850a8ddf711%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Using include_vars and with_items with optiona files == bug?

2017-07-10 Thread Brian Coca
Well, when you include_vars you are normally overwriting existing
vars, this will happen in a with_ loop or outside of it, that is
normal behaviour.

As for the error wiping out myvars ... the task failed, so none of the
work was done. The previously accumulated data in the 2 files that did
work is lost as the task ends up not importing any vars as it failed
as a whole, even if parts of it succeeded.

--
Brian Coca

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