[ansible-project] Dynamic conditionals via with_items

2015-03-23 Thread Bruce Pennypacker
We have a role that's designed to install & configure nagios in one of our myriad environments. I'm in the process of getting it to work in a new environment. One of the tasks in this role installs a bunch of common nagios check scripts via a with_items loop in a pretty straightforward manner

[ansible-project] ec2_tag module: unable to delete tags using variable names

2014-10-08 Thread Bruce Pennypacker
I'm trying to do something that I thought was fairly straightforward but I'm not having any luck. In a nutshell I need to delete a tag from an EC2 instance, but the name is a concatenation of a variable and a constant. What I'm trying is basically this: vars: - foo: sometag

[ansible-project] fetch module working fine in 1.5.3, hangs in 1.6.6

2014-10-03 Thread Bruce Pennypacker
I have an extremely simple playbook that uses the fetch module to allow our developers, qa, etc. fetch logs from production servers that they otherwise don't have any access to. The entire playbook consists of: - hosts: "{{ stack_in }}-{{ env_in }}" user: ec2-user sudo: True vars: fet

Re: [ansible-project] Complex data types with nested lists

2014-05-07 Thread Bruce Pennypacker
t; I'd recommend storing you keys in files, and using lookup('file', ...) > > The. You can store multiple keys in a single file. > > Additionally you could just store multiple keys as a string with new lines > in your current data structure and not try using a list.

[ansible-project] Complex data types with nested lists

2014-05-07 Thread Bruce Pennypacker
We have a role that defines user accounts as follows: users: - username: user1 comment: User 1 uid: 3001 ssh_key: "xxx" - username: user2 comment: User 2 uid: 3002 ssh_key: "yyy" Users are then grouped by name into other lists: regular_users: - user1 - user2 ...

[ansible-project] Behavior of ec2_elb module

2014-04-22 Thread Bruce Pennypacker
I have a bit of a bone to pick with the way the ec2_elb module currently operates, and I'm wondering if other folks have had issue with this or if they like the way it currently works. A bit of background first, especially for those who aren't EC2 & ELB experts. Amazon makes their ELB (elastic

[ansible-project] Debugging a large template file

2014-04-14 Thread Bruce Pennypacker
I'm in the process of trying to migrate a rather large (200+ line) configuration file from a homebrew templating system to an ansible template. I have a very simple playbook that just tries to install the template into /tmp so I can do some validation on it. Unfortunately it looks like I didn

[ansible-project] Behavior of ec2_elb module

2014-02-13 Thread Bruce Pennypacker
I occasionally run into an issue with the ec2_elb module that I think needs to be addressed. This module is used to add and remove Amazon EC2 instances to/from an Amazon load balancer. The API into Amazon is asynchronous, so when you use it to add an instance to a load balancer it issues a "i

[ansible-project] Re: mysql_db state=import only once

2013-11-26 Thread Bruce Pennypacker
It looks like the mysql_db module will blindly run mysqldump wiht the specified target file if it's specified, so yes it's currently expected behavior. What you would probably need to do is run an action before you call mysql_db that checks to see if the database already exists and register a

Re: [ansible-project] Idempotent creation of AWS RDS ?

2013-11-26 Thread Bruce Pennypacker
I'd be more than happy to improve the rds module. The question I have is what's the best approach to take. The problem, as I see it, is that the rds interface is rather complex, so trying to distill it down for Ansible has the potential to be rather tricky. There are a number of both required

[ansible-project] Re: Idempotent creation of AWS RDS ?

2013-11-25 Thread Bruce Pennypacker
For the time being you can use command=facts to see if it already exists and only use command=create if it doesn't. -Bruce On Monday, November 25, 2013 4:07:41 PM UTC-5, Chris Shenton wrote: > > I can create an AWS EC2 instance with the 'ec2' module and a unique 'id', > and Ansible skips creati