Re: [ansible-project] Getting hostvars from an intersection of groups

2015-10-25 Thread Mehul Ved
Hi Bryan, Here's what I get when I run the command $ RAX_CREDS_FILE=.raxpub ansible web -i inventory/rax.py -m debug -a "msg={{ hostvars[groups['beta']|intersect(groups['db'])[0]]['db_port'] }}" --limit beta -v beta_web1 | FAILED => Failed to template msg={{ hostvars[groups['beta']|intersect(grou

[ansible-project] Re: apt update failing on ubuntu-14.04 in ec2

2015-10-25 Thread Igor Cicimov
Thanks Mark for confirming this. Now off to update all of my playbooks :-( On Saturday, October 24, 2015 at 7:36:45 AM UTC+11, Mark McWilliams wrote: > > I am noticing exactly the same thing. Like you, it just started happening > in the last few days. I believe its related to Canonical's Ubuntu A

[ansible-project] Re: Is there a way to specify a password for the SSH session in config file or CLI

2015-10-25 Thread Jason Gilfoil
Hmm, well in my test playbook, i just had - hosts: all I'm guessing that's why I didn't need to pass the additional variable. On Sunday, October 25, 2015 at 6:52:12 PM UTC-4, techraf wrote: > > Thank you. That's the solution. > > > But... I would like to ask if your example really did work for y

[ansible-project] Re: Dynamic deployment to AWS w/ Groups

2015-10-25 Thread Igor Cicimov
Well as I expected this might be little bit confusing to a beginner. So basically the answer to your question was: tag the instances you create based on the environment you are creating them in and then use that tag for the configuration task(s). Which means you need to base the exact_count on

[ansible-project] Re: ansible --inventory option with a trailing comma

2015-10-25 Thread techraf
Well... According to this post it is a hack. Still information is scarce. Is it intentional, a quick fix for the purpose of running against single host, or is it a bug, that got utilized this way... On Sunday, October

[ansible-project] Re: Is there a way to specify a password for the SSH session in config file or CLI

2015-10-25 Thread techraf
Thank you. That's the solution. But... I would like to ask if your example really did work for you? I managed to do what I wanted, but in addition I also had to pass a variable to hosts in playbook: ansible-playbook -i 192.168.0.1, playbook.yml --extra-vars "newpi=192.168. 0.1 ansible_ssh_pass

[ansible-project] Re: Is there a way to specify a password for the SSH session in config file or CLI

2015-10-25 Thread techraf
Thank you. That's the solution. But... I would like to ask if your example really did work for you? I managed to do what I wanted, but in addition I also had to pass a variable to hosts in playbook: ansible-playbook -i 192.168.0.1, playbook.yml --extra-vars "newpi=192.168. 0.1 ansible_ssh_pass

[ansible-project] Wrong group_var getting read?

2015-10-25 Thread Francisco Reyes
Puzzled with this one. In my inventory I have [group1] ... some machines MachineA [group2] ... some machines MachineA [group3] ... some machines MachineA So, I have one machine in all 3 groups. In group_vars I have group1 group2 group3 a variable defined in both group2 and group3 is picking up t

[ansible-project] Re: Syntax error while using Ansible docker module

2015-10-25 Thread Vikas Kumar
Hi Kunal, I don't have a machine to confirm, but I guess there is a syntax error in your playbook. A new block should have two spaces of indentation. Try to make that change and see. Regards, Vikas On Sunday, 18 October 2015 09:08:11 UTC+11, Kunal Pariani wrote: > > Hello, > I mm new to Ansi

[ansible-project] Re: Syntax error while using Ansible docker module

2015-10-25 Thread Markus Ellers
are you doing the docker pull with root directly on the machine too? Maybe some of the environment variables that are needed to make the connection are not loaded. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this gro

[ansible-project] Re: Dynamic deployment to AWS w/ Groups

2015-10-25 Thread Rob Wilkerson
I've been running this over in my head and I think I'm more confused than ever. I don't really care whether I specifically use dynamic inventory or any other specific technique. I care that my script is idempotent, reasonably simple to execute for any developer and somewhat consistent with Ansi

[ansible-project] Re: changed_when: NumberA > NumberB

2015-10-25 Thread Jason Gilfoil
I found the answer. By putting | int }} next to the variable, it converts to an integer and compares properly. -- 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

[ansible-project] Re: changed_when: NumberA > NumberB

2015-10-25 Thread Jason Gilfoil
I came across this link which pretty much explains what my problem is. These are strings i'm trying to do mathematical compares against. I'd need a way to convert them to int'ss to do a comparison like this. If anyone has any ideas, please let me know. https://github.com/ansible/ansible/issues/

[ansible-project] Re: Is there a way to specify a password for the SSH session in config file or CLI

2015-10-25 Thread Jason Gilfoil
My mistake. I thought i'd used it previously in a playbook, but when i went back and looked it was commented out. So If i'm understanding all your requirements properly. I think this should work(and i've tested it this time). ansible-playbook -i 192.168.0.1, playbook.yml --extra-vars "ansible_

[ansible-project] Re: EC2 tag instance

2015-10-25 Thread Adithya Khamithkar
I fixed it, I was looking at the wrong region On Saturday, October 24, 2015 at 7:59:14 PM UTC+5:30, Adithya Khamithkar wrote: > > Hi, > > I am trying to using the EC2 module to take my EC2 instances. > > I have using the following code: > - name: Tag a resource > local_action: > module: ec2

[ansible-project] Re: Is there a way to specify a password for the SSH session in config file or CLI

2015-10-25 Thread techraf
You mean a parameter in the playbook? Never thought it was possible, but I tried your suggestion and it did not work. I got the following (I am using 1.9.4 now): ERROR: ansible_ssh_pass is not a legal parameter in an Ansible task or handler The link you mentioned is however a description of th

[ansible-project] changed_when: NumberA > NumberB

2015-10-25 Thread Jason Gilfoil
I'm attempting to compare version numbers of a app by extracting the current version from the output of a shell command and comparing it to the version to be deployed. However the result of the changed_when: evaluation is always true, regardless of the numbers I put in. I've confirmed the numb