Re: [ansible-project] How can I configure an “all or nothing” Ansible playbook?

2016-09-03 Thread Matt Coddington
Hi Amir, Have you taken a look at http://docs.ansible.com/ansible/playbooks_error_handling.html#aborting-the-play? I haven't used it myself, but i think the any_errors_fatal play option may be what you need? matt On Fri, Sep 2, 2016 at 5:21 PM, Amir Samary wrote: > Hi

Re: [ansible-project] Re: Mysql Idempotency Failure

2014-07-17 Thread Matt Coddington
i would guess it's an ordering thing. the play prior to the failed one you are templating your .my.cnf. if that template is also using {{ mysql_root_password }} then you have locked yourself out of mysql by updating your .my.cnf with the new password prior to changing it. put the correct

Re: [ansible-project] using hostvars not resolving variables calculated from facts

2014-03-25 Thread Matt Coddington
On Tue, Mar 25, 2014 at 8:39 AM, C. Morgan Hamill cham...@wesleyan.eduwrote: Excerpts from Matt Coddington's message of 2014-03-24 22:58:50 -0400: Using Ansible 1.5.3 I'm having some trouble with a situation where I have a variable that I'd like to use in a template that uses hostvars

Re: [ansible-project] using hostvars not resolving variables calculated from facts

2014-03-25 Thread Matt Coddington
Hey Morgan, Thanks so much for this... all very good ideas, I see how they may work outside of the current way I was thinking about this problem... will definitely try a few out and let the list know where I land :) matt On Tue, Mar 25, 2014 at 2:27 PM, C. Morgan Hamill

Re: [ansible-project] using hostvars not resolving variables calculated from facts

2014-03-25 Thread Matt Coddington
, 2014 at 2:56 PM, Matt Coddington codding...@gmail.comwrote: Hey Morgan, Thanks so much for this... all very good ideas, I see how they may work outside of the current way I was thinking about this problem... will definitely try a few out and let the list know where I land :) matt On Tue

Re: [ansible-project] using hostvars not resolving variables calculated from facts

2014-03-25 Thread Matt Coddington
shouldn't have to indirect through the hostvars structure unless you need the variables for another host). On Tue, Mar 25, 2014 at 3:04 PM, Matt Coddington codding...@gmail.comwrote: On Tue, Mar 25, 2014 at 2:58 PM, Michael DeHaan mich...@ansible.comwrote: I would not expect you would need

Re: [ansible-project] Re: Traceback on group_by

2014-03-24 Thread Matt Coddington
Hi Mark/James, Do you guys know if there was a bug filed on this? I'm running into a similar thing in 1.5.3. If not i'll try and put together a minimal playbook to reproduce. thanks, matt On Tue, Feb 4, 2014 at 6:50 PM, James Tanner tanner...@gmail.com wrote: Please file a bug for any

Re: [ansible-project] Re: Traceback on group_by

2014-03-24 Thread Matt Coddington
: [localhost], vars: {ansible_connection: local}}, web: {hosts: [localhost], vars: {ansible_connection: local}}}' Thanks, Mark On Monday, March 24, 2014 1:58:12 PM UTC-5, Matt Coddington wrote: Hi Mark/James, Do you guys know if there was a bug filed on this? I'm running into a similar

Re: [ansible-project] Re: Traceback on group_by

2014-03-24 Thread Matt Coddington
Thanks James for the patch! I can verify that https://github.com/ansible/ansible/commit/dc658eaa1c636c47804bf70eddc55ada5e4078bf, when applied manually to 1.5.3 fixes my issues here! matt On Mon, Mar 24, 2014 at 4:23 PM, Matt Coddington codding...@gmail.comwrote: I've opened https

[ansible-project] using hostvars not resolving variables calculated from facts

2014-03-24 Thread Matt Coddington
Using Ansible 1.5.3 I'm having some trouble with a situation where I have a variable that I'd like to use in a template that uses hostvars but the variable in question is calculated from facts. I have a template that looks like this: {% for host in groups['uat4-webapp']|sort %} BalancerMember

[ansible-project] group_by and group vars

2014-01-03 Thread Matt Coddington
I use group_by to set up some groups in a play, but it looks like this doesn't automatically load anything i have in group_vars for those new groups. I suspect group_vars are getting picked up only at the beginning of a play. If you know the set of groups you're creating with group_by, you can

Re: [ansible-project] group_by and group vars

2014-01-03 Thread Matt Coddington
, Matt Coddington codding...@gmail.comwrote: Hadn't considered defining the group without hosts in inventory, but tried that and it doesn't work that way either. Had been trying on 1.4.3, but just tried as well on devel and it shows the same behavior. I've submitted issue #5499. thanks