Re: [ansible-project] Using binary data in Ansible Vaults.

2014-12-19 Thread Stephen Gargan
ven to the "src" of > a copy operation (or template operation), I wonder if there's a better way > to make this happen without needing to shell out to an extra CLI. > > It might require vault knowing that a file is not YAML when it is executed > though... > > &g

[ansible-project] Using binary data in Ansible Vaults.

2014-12-19 Thread Stephen Gargan
I've been using a pattern of base64 encoded values and jinja templates deal with storing binary data in vaults and have put together scripts to simplify the process; I've found them pretty useful and figured others might get some use out of them. https://github.com/sgargan/ansible-vault-tools

[ansible-project] Issue creating Cloudwatch alarms

2014-10-23 Thread Stephen Gargan
I'm trying to create some alarms using the metrics module. I'm using pretty much the exact example given in the docs - name: create alarm ec2_metric_alarm: state: present region: us-west-2 name: "cpu-low" metric: "CPUUtilization" namespace: "AWS/EC2"

[ansible-project] Re: extra_vars don't override inventory variables in templates (continuing #9242)

2014-10-22 Thread Stephen Gargan
Hagai, I had a similar issue and posted a pull request for it a while back. Its not been merged yet but you can grab it here https://github.com/ansible/ansible/pull/9106 Try applying it and see if it fixes your issue too. regards, Steve. On Wednesday, 22 October 2014 13:48:18 UTC+1, Hagai K

[ansible-project] Bug reporting fixing ettiquette. Bug before fix?

2014-09-12 Thread Stephen Gargan
Hit an issue with overriding include parameters with variables passed in as extras. I've made a fix and added a pull request, https://github.com/ansible/ansible/pull/8984 Added it as a bugfix pull request, but wasn't sure if there should have been a bug report first. What is the done thing? Is

Re: [ansible-project] Re: Aggregating role facts

2014-08-01 Thread Stephen Gargan
ctually surprised it didn't :) >> >> >> >> On Thu, Jul 31, 2014 at 7:02 PM, Stephen Gargan >> wrote: >> >>> Ned, >>> >>> There are better patterns for sharing data that what I'd originally >>> suggested. As your syste

[ansible-project] Re: Storing private ssh keys in variables

2014-07-31 Thread Stephen Gargan
I do something similar to this to store sensitive files in vault. I base64 encode the data and set the variable with the resulting encoded string. Then in my template I use the b64decode filter when applying the variable. in your vault file private_key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1J

Re: [ansible-project] Re: Aggregating role facts

2014-07-31 Thread Stephen Gargan
Ned McClain wrote: > >> Stephen, >> >> I also desperately need a set_facts that works with with_items. Have you >> had any response to these excellent use-case examples? >> >> Ned. >> >> >> On Monday, November 11, 2013 11:14:41 AM UTC-7, Stephe

[ansible-project] Deprecating pararmeters

2014-06-24 Thread Stephen Gargan
Hi, I've been making changes to the ec2_elb_lb module to allow security group names as well as security group ids. While doing this I had added a new module parameter 'security_groups' with the intention of marking the id specific one as deprecated. I was wondering how this kind of deprecation

Re: [ansible-project] Re: Issue with extra variables in 1.5.4

2014-05-29 Thread Stephen Gargan
n wrote: > Per the above, 1.6 is already released. If you have a bug in 1.6 please > file it and include the most minimal reproducer possible along with it. > > We will not be updating the 1.5.X series. > > > > > On Wed, May 28, 2014 at 5:33 PM, Stephen Gargan >

Re: [ansible-project] Re: Issue with extra variables in 1.5.4

2014-05-28 Thread Stephen Gargan
x27;t get it to pass the combined set in here, if I can I'll create a patch. Should I open a bug for this? regards, Steve. On Tue, Apr 15, 2014 at 11:53 PM, Michael DeHaan wrote: > Excellent. Sounded a bit familiar :) > > > > > On Tue, Apr 15, 2014 at 6:44 PM, Garrett P

Re: [ansible-project] Using include with_sequence on localhost

2014-05-27 Thread Stephen Gargan
loop, change to a nested loop using "with_nested". > > > > > On Tue, May 27, 2014 at 2:22 PM, Stephen Gargan wrote: > >> Not to flog a dead horse as there are numerous threads about not allowing >> with_items and includes, but I have a narrower use case th

[ansible-project] Using include with_sequence on localhost

2014-05-27 Thread Stephen Gargan
Not to flog a dead horse as there are numerous threads about not allowing with_items and includes, but I have a narrower use case that I could really use this for and hopefully someone can help me here. I have a script that I use to spin up new cloud vm instances, the variables specific to the

[ansible-project] Issue with extra variables in 1.5.4

2014-04-09 Thread Stephen Gargan
I'm seeing an issue with variable substitution between versions 1.5.3 and 1.5.4. I have an include file that I use to create vm instances, create_instance.yml and a playbook create_cluster.yml that I use to spin up all the instances for the cluster in one go. I have variables in my group_vars

Re: [ansible-project] Problem with the ec2_tag module

2014-04-02 Thread Stephen Gargan
s on other instances. Boto should then get > the credentials automatically from the metadata. > > That’s been working well for us. > > > On Apr 2, 2014, at 10:51 , Stephen Gargan > > wrote: > > I'm having trouble with boto and the ec2_tags module I'm hopin

[ansible-project] Problem with the ec2_tag module

2014-04-02 Thread Stephen Gargan
I'm having trouble with boto and the ec2_tags module I'm hoping someone will know what is up. I'm spinning up an ec2 instance and then immediately calling the ec2_facts and ec2_tags to grab data to configure the instance. The creation and ec2_facts work without a problem, but the ec2_tags fail

Re: [ansible-project] Combining lists

2014-02-20 Thread Stephen Gargan
umentation on set theory filters that may help: > > http://docs.ansible.com/playbooks_variables.html#id22 > > > > > On Thu, Feb 20, 2014 at 1:25 PM, Stephen Gargan > > > wrote: > >> >> I'd like to be able to do the following, hopefully someone can point m

[ansible-project] Combining lists

2014-02-20 Thread Stephen Gargan
I'd like to be able to do the following, hopefully someone can point me to a simple way to do it. I have two lists, one contains vars for all hosts another vars for a specific host. I'd like to join them into a single list that can be iterated over in a template. I reuse the template so would

[ansible-project] Variable expansion and tags with the EC2 module

2014-01-30 Thread Stephen Gargan
I'm deploying a system to an number of machines in EC2 and am seeing some weird behavior with variable expansion I have group_vars where I define a target version for my system and versions for components a, b and c. Typically a, b and c use the same target version, but I need the ability to ov