[ansible-project] Re: bug in lvg module?

2015-01-20 Thread Mark Maas
It seems this was indeed a bug: https://github.com/ansible/ansible-modules-extras/issues/50 But is was closed as fixed on the 6th of november. So I will need to wait until this bit: https://github.com/ansible/ansible-modules-extras/commit/664858ec20630a65bbdedbe52b79bd4e61f6ceec Finds it's way t

[ansible-project] Re: Attempting to combine sub_items and when for application deployment

2015-01-20 Thread Lyle Dietz
Classic PEBKAC. It should have been item.0.application instead of item.0.name. Amazing how easily you figure things out when you spend time away from them. On Tuesday, 20 January 2015 17:01:56 UTC+10, Lyle Dietz wrote: > > I'm trying to deploy specific Java EE EARs to a host based on what groups

[ansible-project] Re: Attempting to combine sub_items and when for application deployment

2015-01-20 Thread Lyle Dietz
For that machine it should be ['catalogue', 'catalogue-db', 'feeds-db', 'fulfilment', 'fulfilment-db', 'ungrouped']. I don't know why 'ungrouped' ends up on there, it isn't something I added, but I see it appear in earlier steps. On Wednesday, 21 January 2015 04:58:12 UTC+10, James Martin wrote

[ansible-project] Possible bug when using serial: and --start-from-task

2015-01-20 Thread Ivan Dimitrov
Hello Group, I think I found a possible bug when using the serial: and start-from-task together. I expect to loop through all my hosts in the host group and start from the specific task for all hosts. But it starts the first host from the specified task, than moves to the next hosts from the b

Re: [ansible-project] Different SSH keys for each host.

2015-01-20 Thread Matt Martz
Via inventory you can set 'ansible_ssh_private_key_file' per host. See http://docs.ansible.com/intro_inventory.html#list-of-behavioral-inventory-parameters On Tue, Jan 20, 2015 at 3:36 PM, wrote: > I know it's possible to add *--private-key=path/to/key *to specify which > ssh key you would like

Re: [ansible-project] Different SSH keys for each host.

2015-01-20 Thread Brian Coca
set this as a host or group var: ansible_ssh_private_key_file -- Brian Coca -- 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 to ansible-project+unsubscr...@go

[ansible-project] Different SSH keys for each host.

2015-01-20 Thread junkmailtrapenator
I know it's possible to add *--private-key=path/to/key *to specify which ssh key you would like Ansible to use. However that assumes that each host requires the same key. Is it possible to specify that setting per host, perhaps in the inventory file or something? -- You received this message b

Re: [ansible-project] Re: How to update host variables

2015-01-20 Thread Peter Mooshammer
Hello Dag, thank you for your input. I added the step you mentioned to my role. But it will not update the IP of the instance and therefore the next step (ssh) times out. Note: although there are loops, I only run with 1 instance thanks and any other idea would reatly appreciated Peter - na

[ansible-project] Re: Attempting to combine sub_items and when for application deployment

2015-01-20 Thread James Martin
What does your group_names variable look like? On Tuesday, January 20, 2015 at 2:01:56 AM UTC-5, Lyle Dietz wrote: > > I'm trying to deploy specific Java EE EARs to a host based on what groups > that host is in. > > Each EAR goes in to it's own deployable directory because we're running > each a

[ansible-project] Re: Grouping variables when using Dynamic Inventory

2015-01-20 Thread James Martin
What do you mean all of your variables are in roles? As in role defaults? If so, that's fine, use inventory variables to override them. Your 3 environment scenario is fairly typical. The approach depends on you. Here's a couple of rough approaches (hard to tell based on your description).

Re: [ansible-project] What is the proper name for an Ansible "installation"?

2015-01-20 Thread Matt Martz
I believe the term used in Tower is 'project'. I however do see a number of people name the repo with the word "playbooks" included in the name, such as "ansible-playbooks" (which is actually what I have my repo named). On Tue, Jan 20, 2015 at 12:04 PM, Brian Coca wrote: > not official, but my

Re: [ansible-project] What is the proper name for an Ansible "installation"?

2015-01-20 Thread Brian Coca
not official, but my vote is for 'jeesh' -- Brian Coca -- 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 to ansible-project+unsubscr...@googlegroups.com. To po

[ansible-project] Re: Pass variable to hosts: in playbook

2015-01-20 Thread James Martin
See my original response. You'll need to use the add_host module to add {{ vmname }} to the inventory if you want to use it on the next play. Also, you playbook will be much cleaner if you use the URI module rather than shelling out to curl. - James On Tuesday, January 20, 2015 at 10:58:23 A

[ansible-project] Re: Pass variable to hosts: in playbook

2015-01-20 Thread Piet83
--- - hosts: all pre_tasks: # Task creates a vm through an api. Register output with vm name - name: Create vm from emplate command: 'curl https://vm.example.nl/api/create' delegate_to: localhost register: vm # Filter out exact vm name - name: Define vm variable set_fact: v

[ansible-project] Re: EC2: collect list of private-ip from on group, use it in a second group

2015-01-20 Thread James Martin
Here's a quick sample playbook that should do what you are trying to do. Keep in mind that the ec2.py dynamic inventory script will gather the private IPs for you, you shouldn't need an explicit task. - hosts: localhost tasks: - debug: msg="{{ hostvars[item].ec2_private_ip_address }}"

[ansible-project] Re: Ansible SSH as one user and Sudo as another

2015-01-20 Thread Stuart Budd
Ans thanks tkuratomi On Thursday, 15 January 2015 16:53:04 UTC, Stuart Budd wrote: > > I am having trouble with configuring Ansible and sudo to allow me to SSH > into a server and run a command as another user. > I have gone through the questions / answers below and the Ansible > documentation

Re: [ansible-project] Ansible SSH as one user and Sudo as another

2015-01-20 Thread Stuart Budd
Thank you Brian and Toshio for your replies. Thanks Toshio for your detailed reply. I did not realise that it is the ansible command can be run from the Ansible server as a non-root user. I had been setting up a sudo entry for the Ansible commands. However, that is not where my confusion with t

[ansible-project] Re: Pass variable to hosts: in playbook

2015-01-20 Thread James Martin
Assuming your first task returns an ip address, if you want to reference it, you'd need to use {{ ip.stdout }}. Alternately, you could use the http://docs.ansible.com/uri_module.html instead of using curl, and you could just use {{ ip }}. You'll also have to add it to the inventory before you

[ansible-project] Grouping variables when using Dynamic Inventory

2015-01-20 Thread Dan Storm
Hi. I'm looking at having three environments. A development, staging and production environment. Development environment is a local Vagrant box. Staging would be a DigitalOcean droplet. Production would be several DigitalOcean droplets. All of the DigitalOcean droplets are fetched with a Dynam

[ansible-project] Pass variable to hosts: in playbook

2015-01-20 Thread Piet83
--- - hosts: all pre_tasks: # Task creates a vm through an api. Register output with vm name - name: Create vm from emplate command: 'curl https://vm.example.nl/api/create' delegate_to: localhost register: ip # Continue play on newly created vm - hosts: '{{ ip }}' # Roles to c

[ansible-project] EC2: collect list of private-ip from on group, use it in a second group

2015-01-20 Thread Tzach Livyatan
Posted a similar question a few days ago, got the right answer. Now I can better explain what I'm looking for. I'm building a EC2 system from two types of servers: - cluster nodes - loader nodes Each loader is generating traffic to ALL cluster nodes. My goal is a playbook which collect private-ip

Re: [ansible-project] bug in lvg module?

2015-01-20 Thread Mark Maas
I’ve got a bit more verbosity: <10.220.226.90> REMOTE_MODULE lvg vg=vg.osddata.raven state=present pvs=/dev/xvdb,/dev/xvdc looks like the module is getting the correct data? On Tuesday, January 20, 2015 at 1:53:31 PM UTC+1, Mark Maas wrote: Tried it with this: > > - name: Maak een vg-tc >

Re: [ansible-project] bug in lvg module?

2015-01-20 Thread Mark Maas
Tried it with this: - name: Maak een vg-tc lvg: vg: vg.osddata.raven pvs: /dev/xvdb,/dev/xvdc state: present But still no go: failed: [10.220.226.90] => {"err": " Device /dev/xvdb /dev/xvdc not found (or ignored by filtering).\n Unable to add physical volume '/dev/xvdb /dev/x

[ansible-project] Re: Windows access denied

2015-01-20 Thread J Hawkesworth
A few things you could try... check the windows event log Check the user you are connecting with is actually a member of the administrators group. log in to the windows machine as the same user you are connecting via ansible with and attempt to run the same msi. Hope this helps, Jon On Tues

[ansible-project] Can role depndencies be overridden?

2015-01-20 Thread junkmailtrapenator
Let's say I install a role from Ansible Galaxy: $ ansible-galaxy install SomeUser.role1 Now this role is great and does exactly what I want except it has a role dependency on 'SomeUser.role2 which I don't need or want because I'm doing the equivalent of what it does in a different way. So what

Re: [ansible-project] bug in lvg module?

2015-01-20 Thread Brian Coca
there is current bug in = option parser, try this: - name: Maak een vg-tc lvg: vg: vg.osddata.raven pvs: /dev/xvdb,/dev/xvdc state: present -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this g

[ansible-project] Re: Windows puzzler

2015-01-20 Thread J Hawkesworth
Ok, well I'm still mystified too, but here's a few other thoughts. Might be worth checking what is between the controller and the windows machine network wise in case there's some proxying or something. Would still be very strange behaviour for a proxy to introduce though. I notice you have

[ansible-project] Re: bug in lvg module?

2015-01-20 Thread Mark Maas
BTW, using ansible 1.8.2. On Tuesday, January 20, 2015 at 1:06:19 PM UTC+1, Mark Maas wrote: > > Hi List, > > I’m trying to create an lvg using the lvg ansible module like so: > > - name: Maak een vg-tc > lvg: vg=vg.osddata.raven pvs=/dev/xvdb,/dev/xvdc state=present > > But I’m getting this err

[ansible-project] bug in lvg module?

2015-01-20 Thread Mark Maas
Hi List, I’m trying to create an lvg using the lvg ansible module like so: - name: Maak een vg-tc lvg: vg=vg.osddata.raven pvs=/dev/xvdb,/dev/xvdc state=present But I’m getting this error back: failed: [10.220.225.96] => {"err": " Device /dev/xvdb /dev/xvdc not found (or ignored by filter

[ansible-project] Variable: register: ec2 is not properly parsed when used

2015-01-20 Thread Ivan Dimitrov
Hello Guys, This is the first time I write to the group, so please bare with me if I miss something or my English is bad. I want to create ec2 instances and use the output of the ec2 module as input for other tasks, like the description in the documentation. Unfortunately, unlike the documen

[ansible-project] Possible bug when usnig setial: and --start-from-task

2015-01-20 Thread Ivan Dimitrov
Hello Group, I think I found a possible bug when using the serial: and start-from-task together. I expect to loop through all my hosts in the host group and start from the specific task for all hosts. But it starts the first host from the specified task, than moves to the next hosts from the b

[ansible-project] Variable: register: ec2 is not properly parsed when used

2015-01-20 Thread Ivan Dimitrov
Hello Guys, This is the first time I write to the group, so please bare with me if I miss something or my English is bad. I want to create ec2 instances and use the output of the ec2 module as input for other tasks, like the description in the documentation. Unfortunately, unlike the documen

[ansible-project] Windows access denied

2015-01-20 Thread KlimaXima
Hello all, I am following this turorial http://docs.ansible.com/intro_windows.html to install the python on ansible but i keep running into problem. I think it has something to do with the windows run as administrator or something. Here is what ansible says: This installation package could not

[ansible-project] Attempting to combine sub_items and when for application deployment

2015-01-20 Thread Lyle Dietz
I'm trying to deploy specific Java EE EARs to a host based on what groups that host is in. Each EAR goes in to it's own deployable directory because we're running each application component in it's own container. What I have is: - name: Copy EAR copy: src: "{{ maven }}/au/com/comp

[ansible-project] Possible bug when using serial and run_once

2015-01-20 Thread Ivan Dimitrov
Hello Group, Here is another possible bug. When using serial and run_once, the run_once command is executed for every serial-loop, instead of once for the entire playbook. I expected it to run only once for the entire playbook. I'm using the latest ansible 1.8.2 Here is an example: I expect

[ansible-project] Re: Possible bug with 1.8.x : Loading environment specific variable files via vars_files no longer working for - [] syntax

2015-01-20 Thread Leibo
Upgrading into 1.8.2 (from 1.6.x) produces the same behaviour for me. I use: vars_files: - "vars/DEFAULTS.yml" - "vars/{{ansible_system}}.yml" - ["vars/{{ansible_distribution}}.yml", "vars/empty.yml"] - ["vars/{{ansible_distribution}}_{{ansible_distribution_major_version}}.yml"

Re: [ansible-project] Re: Task performs work despite conditional

2015-01-20 Thread James Morgan
Perfect thanks -- 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 to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-proj

[ansible-project] Re: win_package module

2015-01-20 Thread Paul Tötterman
> > I'm looking for the win_package module. > Could you tell me where is it possible to get or download it ?? > It seems abandoned, but https://github.com/ansible/ansible/commit/961ab95b452cb3cd28c071e357a4afa8ead11f79 Cheers, Paul -- You received this message because you are subscribed to t