[ansible-project] Can I set ansible_ssh_pass in a task?

2014-07-08 Thread Larry Fast
I'm using a database system for passwords. It has a CLI for pulling data. For each server I would like to do something like - hosts: all gather_facts: no tasks: local_action: ansible_ssh_pass=`db_cli cli_params` I realize this code is complete invalid. Can I do this in a task, a

[ansible-project] when clause in combination with list of hashes.

2014-07-08 Thread Nico K.
Hi, Consider the following list of hashes being defined: my_list: [ { src: a, dest: b, mode: 755 } , { src: d, dest: e, mode: 640 } ] and this task: - name: example file: path: {{ item }} state: absent with_items: some_other_list when: item not in

Re: [ansible-project] dict/hash-layout question

2014-07-08 Thread stibbons . peter
Ok, at least I know then. I'll try your suggestions and see where it takes me. As for the use case, this will be part of an Oracle DBaaS-offering where we're going to use Ansible to deploy everything (Provision VM's, os/storage-config, Oracle Real Application clusters etc) and this is one

Re: [ansible-project] Need advise on define inventory-specific variables

2014-07-08 Thread Chengbing Liu
Sorry, the question was not stated clearly. I have different inventory files corresponding to different clusters, e.g.: hosts_cluster1 [NameNode] host1 hosts_cluster2 [NameNode] host2 They have the same group names, therefore I decide to move the variable definitions from group_vars

Re: [ansible-project] when clause in combination with list of hashes.

2014-07-08 Thread Michael DeHaan
when: item.src not in my_list On Tue, Jul 8, 2014 at 4:11 AM, Nico K. nkrabsh...@gmail.com wrote: Hi, Consider the following list of hashes being defined: my_list: [ { src: a, dest: b, mode: 755 } , { src: d, dest: e, mode: 640 } ] and this task: - name:

Re: [ansible-project] Can I set ansible_ssh_pass in a task?

2014-07-08 Thread Michael DeHaan
You can use set_fact to do this. There is a slight question of whether this actually works, as I haven't tested it :) Really, it sounds like you should look into an external inventory script for me, but if you have a CLI interface, it will hit that CLI lots of times and potentially overwhelm the

Re: [ansible-project] Need advise on define inventory-specific variables

2014-07-08 Thread Michael DeHaan
They have the same group names, therefore I decide to move the variable definitions from group_vars to the all:vars section of inventory file. However, I cannot define structured variables like before in group_vars. I would consider different group names for each, and a parent group that contains

Re: [ansible-project] Conditional Includes, Roles and Multiple Playbooks

2014-07-08 Thread Michael DeHaan
On Mon, Jul 7, 2014 at 11:39 AM, Ryan Garrett rgarr...@gmail.com wrote: I am trying to figure out the structure for how I am going to use Ansible and am having some design issues. I would like to have multiple playbooks in my roles, each with a subset of tasks I need to be done. E.g. - a

Re: [ansible-project] vmware/esx/vsphere module - planning

2014-07-08 Thread Michael DeHaan
Sounds like we'd be interested in taking a look at least, and a PR is a good way to get that in the queue. I will admit now the queue is quite longish as we're powering through things the best we can. I imagine if async is not used, it's a blocking operation, and the async operation in ansible

Re: [ansible-project] vmware/esx/vsphere module - planning

2014-07-08 Thread Corey
In looking at my original proposal, I think combining two unique implementations of Async functionality is going to be a bad idea, if not for being difficult to troubleshoot and impossible to test, for being a bad design. Instead, I would like to suggest not using PySphere Async support and have

[ansible-project] synchronize module update request

2014-07-08 Thread Seba Grillo
Hello fellow admins and programmers, I was wondering if it's possible to have the synchronize module modified so compression is optional (like compression=yes/no, etc), rather than hardcoded. I was working on a playbook to backup all my servers and I found out about the synchronize module,

[ansible-project] problem with ansible bastion hosts /playbook connectivity

2014-07-08 Thread Simon Tyler
Hello, I was running an older version of ansible, and I couldn't find a way to get it to connect through a bastion host to run scripts against a destination server, so I tried upgrading ansible. (yum upgrade to 1.6.2) Now it appears that some things don't work the way they did eg. it doesn't

Re: [ansible-project] problem with ansible bastion hosts /playbook connectivity

2014-07-08 Thread Brian Coca
The $ variables have been dropped from current ansible, they have been deprecated for a loong time. The new way to do the host variables would be writing plays like this: hosts: {{server_name}} and pass on the command line as before, there is some more advanced stuff you can do now, like using

[ansible-project] Bug with composer module on OSX

2014-07-08 Thread Cameron Junge
Hi All, I guess this isn't a common case, but I've experienced an error with using the composer module on an OSX machine. Runs perfectly on Linux, with the same exact settings! TASK: [Composer install] *** localhost REMOTE_MODULE composer no_dev=False