Re: [ansible-project] error with vars_files

2014-01-28 Thread nORKy
I did a debug test: > ok: [srweb03] => (item=users) => { > "item": "users", > "msg": "the value in variable is users" > } hmm... users is a string ! why ?? Le mardi 28 janvier 2014 08:55:23 UTC+1, nORKy a écrit : > > it changes nothing if I set 'gather_facts' to false. Same error > >

[ansible-project] transforming data from the inventory into role parameters

2014-01-28 Thread Nick
Hi, When writing roles, Itry and keep them re-usable. This means avoiding making them dependent on any arrangement of vars in my inventory and playbooks. The problem I keep bumping into then is that ansible / jinja2 havelimited means of transforming,for example, a list of server descriptionhashe

[ansible-project] Ask for variable value if variable not defined.

2014-01-28 Thread Marcin Prączko
Hi, Have question whether is possible (ansible 1.4.2 >) setup prompt for volue for variable in variable is not defined. For example: First run of playbook: - variable is not defined - ask for value - task write value of variable to some ansible vars file ... Do other tasks... Next run of playb

Re: [ansible-project] Ask for variable value if variable not defined.

2014-01-28 Thread Michael DeHaan
There's no mechanism for this. vars_prompt always prompts for the variable. On Tue, Jan 28, 2014 at 9:25 AM, Marcin Prączko wrote: > Hi, > > Have question whether is possible (ansible 1.4.2 >) setup prompt for volue > for variable in variable is not defined. > > For example: > First run of pl

[ansible-project] How to use array of hash in yml?

2014-01-28 Thread howachen
I know we can use array in yml, e.g. web_servers: - "server.1=host1" - "server.2=host2" - "server.3=host3" However, will it be possible to use array of hash/dictionary? Thanks. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] How to use array of hash in yml?

2014-01-28 Thread Brian Coca
yes, yaml lets you use any combo of hash/dictionary with list/array that you can come up with. webservers: - 1: host1 - 2: host2 - 3: host3 webservers is a list and each element is a hash with single key value. -- Brian Coca Stultorum infinitus est numerus 01110111001001100101011011

Re: [ansible-project] Not detecting whether variable for 'user' is setup.

2014-01-28 Thread Marcin Prączko
Hi, Accually I think is still not working as expected: [vagrant@devopsadmin dir01]$ ansible --version ansible 1.4.3 Playbook: - name: Common | Ping all hosts gather_facts: no hosts: all user: "{{ ssh_user }}" sudo: yes vars_files: - vars/common_sshuser.yml # ---

[ansible-project] different groups with different variables using the same role in the same host

2014-01-28 Thread Guillem Liarte
Hello, I think I have got to a point where I really get confused about teh way variables are used. I need some clarity to understand how you would do this with ansible: Lets say I have one single hosts where I want to create a collection of directories in /data/db/{project1,project2,n} I am u

[ansible-project] ansible_ssh_user and delegate_to unexpected behavior

2014-01-28 Thread Niku Toivola
Hello, I noticed that an ansible_ssh_user defined in the inventory for a host or group is used* also when delegating to a host that does not have it set*. This seems counterintuitive to me and makes it difficult to delegate tasks to a host that requires a different user. I wonder if this is by

Re: [ansible-project] Ask for variable value if variable not defined.

2014-01-28 Thread Adam Heath
The following is pseudo code, parts of it may not be entirely correct. But the real trick is to use when. == - name: ask for variable when: my_var_name is not defined register: my_var_name_result vars_prompt: . - name: save vars when: my_var_name_result.changed $action: == O

Re: [ansible-project] Not detecting whether variable for 'user' is setup.

2014-01-28 Thread Adam Heath
It's remote_user, which I think changed in 1.4. I just remember seeing that in the docs yesterday. On 01/28/2014 10:54 AM, Marcin Prączko wrote: Hi, Accually I think is still not working as expected: [vagrant@devopsadmin dir01]$ ansible --version ansible 1.4.3 Playbook: - name: Common | Ping

[ansible-project] rabbitmq json config to setup exchanges and queues

2014-01-28 Thread david . neudorfer
Setting up rabbitmq with ansible works really well but I also need to pass it a config file to setup the exchanges and queues. According to the rabbitmq documentation this is done with passing the json file to the management plugin. Is t

Re: [ansible-project] VMware inventory available?

2014-01-28 Thread Brian Coca
updated my draft inventory plugin, had to adjust for a couple of vmware product versions i have as things seem to change quite a bit. https://github.com/bcoca/ansible/tree/vsphere_inventory its still work in progress, please test, break, vilify and request features. -- You received this messag

Re: [ansible-project] transforming data from the inventory into role parameters

2014-01-28 Thread Kahlil Hodgson
If your control node has Jinja2.7 you may be able to use the 'map' filter to emulate the desired comprehension See http://jinja.pocoo.org/docs/templates/#builtin-filters Kahlil (Kal) Hodgson GPG: C9A02289 Head of Technology (m) +61 (0) 4 2573 0382 Dea

Re: [ansible-project] Rackspace Private Cloud?

2014-01-28 Thread Nathan Polonski
Hi Matt, Can you post an update here if you do get a chance to take a look at this? I'm starting to do the same thing as Nick and was hoping to test some things out on Public Cloud while my Private Cloud is being built. Thanks! Nathan On Friday, January 17, 2014 4:16:58 PM UTC-5, Matt Martz wro

Re: [ansible-project] different groups with different variables using the same role in the same host

2014-01-28 Thread Kahlil Hodgson
Hi Guillem. This looks like a modeling problem: the project variables need to be detached from the host/group variables. Try something like: # group_vars/all.yml --- project: test1: domain: test1.com #... other vars for project test1 test2: domain: test2.com # ...

Re: [ansible-project] Rackspace Private Cloud?

2014-01-28 Thread Matt Martz
Nathan, Absolutely. I actually have been working on this for around a week now and testing it out.   I submitted a pull request today to enable this functionality. You can see the pull request at https://github.com/ansible/ansible/pull/5806 The next thing I would need to potentially look at is t

Re: [ansible-project] transforming data from the inventory into role parameters

2014-01-28 Thread Nick
On 28/01/14 21:56, Kahlil Hodgson wrote: > If your control node has Jinja2.7 you may be able to use the 'map' > filter to emulate the desired comprehension > See http://jinja.pocoo.org/docs/templates/#builtin-filters Thanks, I did spot that in the documentation, but sadly, no I don't have the righ

Re: [ansible-project] transforming data from the inventory into role parameters

2014-01-28 Thread Kahlil Hodgson
Had a quick look at the source code for the map filter, and I believe it will descend to lower levels and the result is an arbitrary list, so I think this would work. However, this is of no use if your control node is running a stable OS :-) The only other approach I can think of is to split out

Re: [ansible-project] dependency modeling

2014-01-28 Thread Xu Chen
Thanks.. But I am still curious.. is there a way to list all the roles a node is taking when running a task? I can potentially add a line in a common config file for each role. But this won't remove a role from that file if I update the playbook or role dependency such that a node is no longer

Re: [ansible-project] transforming data from the inventory into role parameters

2014-01-28 Thread Nick
On 28/01/14 23:22, Kahlil Hodgson wrote: > Had a quick look at the source code for the map filter, and I believe > [...] this would work. [...] Thanks again. Mainly I'm wondering why no-one else is admitting to have run into this conundrum... N -- You received this message because you are subs

[ansible-project] AnsibleWorks is now just Ansible!

2014-01-28 Thread Michael DeHaan
Hi all, As you know we like to keep things simple around here. When we started the company, Ansible wasn't quite available, so we named the company AnsibleWorks. We've finally arranged things so it was possible to change that, and have done so,and we're pretty excited about being able to make th

[ansible-project] Re: AnsibleWorks is now just Ansible!

2014-01-28 Thread James Cammarata
Hey all, as Michael noted we're moving all of the domains to ansible.com, which now includes Galaxy too - https://galaxy.ansible.com. If you use the old URL, you should be redirected. As part of this move, we consolidated/reorganized some of the various Oauth accounts we were using, which required