Re: [ansible-project] How to use ec2 modules user_data field?

2016-10-07 Thread einarc
Hey, You want to put your data in a variable, let's say in /defaults/main.yml and then invoke that from the ec2_lc module: - ec2_lc: name: "{{env}}-render-premium-{{gitsha}}" ... user_data: "{ {my_user_data }}" I did that exact thing for Launch Configs and it works pref

Re: [ansible-project] include_vars look up files in wrong directory if used with local_action

2016-07-05 Thread einarc
Brian, I'm having the same problem on Ansible 2.0.2 without local action. I'm running on tower On Thursday, December 31, 2015 at 9:45:43 PM UTC-8, Brian Coca wrote: > > include vars is ALWAYS a 'local' action, you don't need to add that > nor delegate_to: localhost, it works the same as a inclu

[ansible-project] Ansible Create AMI and Copy AMI - Tagging Doesn't always work

2016-06-08 Thread einarc
Hello, I'm trying to use Ansible to create an AMi out of an EC2 instance and tag it with NAME: AMI_NAME and then copy it over to another region and do the same thing (TAG it with NAME) to ultimately add it to a Launch Configuration for an ASG. Common sense would indicate that doing and AMI find

Re: [ansible-project] Re: rds module | determining endpoint when module exits without complete result data

2016-06-03 Thread einarc
t;{{ rds_instance_maintenance_window }}" > backup_retention: "{{ rds_instance_backup_retention }}" > size: "{{ mysql_app_db_size }}" > db_name: "{{ mysql_app_db_name }}" > username: "{{ mysql_admin_user }}" > passw

Re: [ansible-project] Re: rds module | determining endpoint when module exits without complete result data

2016-06-03 Thread einarc
_maintenance_window }}" > backup_retention: "{{ rds_instance_backup_retention }}" > size: "{{ mysql_app_db_size }}" > db_name: "{{ mysql_app_db_name }}" > username: "{{ mysql_admin_user }}" > password: "{{

[ansible-project] Re: Testing for a defined but non empty string

2016-06-03 Thread einarc
Tell me about it Leo, the documentation on this language is seriously lacking. On Tuesday, April 7, 2015 at 12:54:01 AM UTC-7, Jialiang Liang wrote: > > I faced the same problem. > > I tried Nick Groenen's code and it doesn't work when the params is like > this: > ``` > foo: > ``` > in this cas

Re: [ansible-project] Testing for a defined but non empty string

2016-06-03 Thread einarc
Why is this not in the documentation for conditionals? it should be basic stuff!!! On Friday, January 31, 2014 at 6:09:15 AM UTC-8, Nick Groenen wrote: > > Yes, if Ansible sees that as None, then you could use |default(None) like > this: > > when: foo|default(None) != None > > -- > Nick Groen

[ansible-project] Re: rds module | determining endpoint when module exits without complete result data

2016-06-03 Thread einarc
Here are two ideas: I'm about to implement this. 1.-Do fire and forget then check back when it's ready and you REALLY need it: http://docs.ansible.com/ansible/playbooks_async.html (see last example) http://toroid.org/ansible-parallel-dispatch In my case I have plenty of things to do before I ne

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
wasn't pretty. >> >> BR, >> Daniel >> >> >> W dniu środa, 1 czerwca 2016 17:14:18 UTC+1 użytkownik einarc napisał: >>> >>> My bad, I tried to edit my original post and add the quotes, it doesn't >>> matter whether you inc

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
able to fix the problem and ended up >> using a workaround. I will try to get the environment back online to see >> what it was exactly but I remember it wasn't pretty. >> >> BR, >> Daniel >> >> >> W dniu środa, 1 czerwca 2016 17:14:18 UTC+1 uż

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
08 AM UTC-7, Johannes Kastl wrote: > > On 01.06.16 17:59 einarc wrote: > > > hosts: {{host_ip}} > > > > Error: > > fatal: [localhost]: FAILED! => {"failed": true, "reason": "Syntax Error > > while loading YAML.\n\n\nThe error

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
I'm having the exact same problem on 2.0.1. In my case I'm including a playbook from the main.yml file of a role. Is that what you're doing? It doesn't matter what you put in the hosts variable even if it is in jinja format it won't work: Option 1: main.yaml - include:auxiliary_playbook.yml va

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-06-01 Thread einarc
Hey, It looks like we need to patch ansible https://github.com/ansible/ansible/issues/15715 On Sunday, March 13, 2016 at 3:50:53 PM UTC-7, Daniel Osielczak wrote: > > Hi Matt, > > thanks for quick answer. As already mentioned, I don't belive this to be a > problem with this playbook, as it runs

[ansible-project] Re: Ansible Autoscaling with Tower and AWS blog post, instances are NOT authorized by server

2016-05-02 Thread einarc
ld be private so the Inventory can work correctly. On Monday, May 2, 2016 at 7:36:33 PM UTC-7, einarc wrote: > > Hello, > > So I followed this post: > > https://www.ansible.com/blog/autoscaling-infrastructures > > And managed to deploy the infrastructure, the problem is the call

[ansible-project] Ansible Autoscaling with Tower and AWS blog post, instances are NOT authorized by server

2016-05-02 Thread einarc
Hello, So I followed this post: https://www.ansible.com/blog/autoscaling-infrastructures And managed to deploy the infrastructure, the problem is the callback isn't working. I keep getting no available hosts: curl -k -s -i --data host_config_key=mykey_here https://My_server_here/api/v1/job_t

[ansible-project] Re: cannot run an ansible playbook with vsphere_guest support

2015-07-17 Thread einarc
The solution is to index the vsphere_guest module call under tasks, as Michael Dehaan posted, like this: - hosts: localhost tasks: - vsphere_guest: vcenter_hostname: myvcenter On Thursday, May 1, 2014 at 10:06:10 AM UTC-7, John Shen wrote: > > $ ansible-playbook vmtest.yml > ERROR: v