Re: [ansible-project] play_hosts - only when current_host == localhost

2014-07-07 Thread sturban
What should current_host be replaced with so that the below only runs for the host localhost? --- - hosts: all sudo: yes tasks: - name:play_hosts debug: var=play_hosts when: current_host == localhost -- Xtratherm Limited is a limited company registered in Ireland. Registered

Re: [ansible-project] play_hosts - only when current_host == localhost

2014-07-07 Thread Brian Coca
when: inventory_hostname == 'localhost'​ -- 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,

Re: [ansible-project] sudo not working for me (Mac OS X Mavericks)

2014-07-07 Thread Mauricio Tavares
On Sat, Jul 5, 2014 at 11:50 AM, Michael Martinez mmartinez...@gmail.com wrote: I am a new ansible user and I can not get the sudo option working for me. To keep things simple, I am just trying a simple command: shutdown -r now In ansible, I am entering it as: ansible system_name -a

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

2014-07-07 Thread Chengbing Liu
I'm using Ansible to deploy and maintain Hadoop clusters. I used to define variables in group_vars/all as shown below: hadoop: # Variables for core-site.xml nameservice: hadoop-namenode # Variables for hdfs-site.xml dfs_blocksize: 256m # Variables for mapred-site.xml

Re: [ansible-project] docker module

2014-07-07 Thread Paul Durivage
Docker images in private repos should have be accessed by the private repo's FQDN, for example: docker.example.com/myimage:tag When pulling by this image name, it's implied that the registry is at docker.example.com and is accessible to the Docker host. It looks like the Docker module makes

[ansible-project] Re: Windows Support Stage 2: Engage Battlestations!

2014-07-07 Thread David Carmean
What I'm primarily interested in is being able to use Ansible as a Vagrant provisioner on Win7 hosts. At the moment I'm kind of resigned to running it locally on the VM, though, as I'd have to do with Packer anyway. On Thursday, July 3, 2014 3:10:18 PM UTC-7, Michael DeHaan wrote: A

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

2014-07-07 Thread Ryan Garrett
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 playbook for System Updates, a playbook for deploying our app, a playbook for

Re: [ansible-project] Re: Windows Support Stage 2: Engage Battlestations!

2014-07-07 Thread Michael DeHaan
We're not really looking to implement running Ansible from Windows, this is about managing Windows remotes. On Mon, Jul 7, 2014 at 11:08 AM, David Carmean dlcarm...@gmail.com wrote: What I'm primarily interested in is being able to use Ansible as a Vagrant provisioner on Win7 hosts. At

[ansible-project] Impact of merging hashes

2014-07-07 Thread Mehul Ved
Hi, I am setting up a system using ansible where my configuration values are defined in defaults/main.yml. If the user wants to override it, they will edit vars/main.yml with the same dictionary structure. e.g. $ cat defaults/main.yml app: port: 1 workers: 10 $ cat vars/main.yml app:

[ansible-project] dict/hash-layout question

2014-07-07 Thread stibbons . peter
Hi, I'm kind of new to Ansible and I haven't really gotten the terminology down yet, so I hope you'd bear with me. I've got a task which loops through a bunch of disks and performs a set of operations on them. The placeholders/keys (CRS,DATA,FRA) are names on a sort of logical volumes which

Re: [ansible-project] Re: Search for EC2 Instances by Tag

2014-07-07 Thread Michael DeHaan
Have you perhaps hand-edited (or someone has) ec2.py? On Fri, Jul 4, 2014 at 1:19 PM, Scott Anderson scottanderso...@gmail.com wrote: Very strange, that's right in the middle of a docstring. No reason for it to break like that. What does the result of /usr/bin/env python --version say?

Re: [ansible-project] play_hosts

2014-07-07 Thread Michael DeHaan
with_items: groups['all'] I wouldn't. I'd use the host loop since it's already there. - hosts: all tasks: - local_action: ... On Sun, Jul 6, 2014 at 11:03 AM, Brian Coca brianc...@gmail.com wrote: you already have a play_hosts variable with the 'current active hosts' in the

Re: [ansible-project] on_failure error handlers - any ideas

2014-07-07 Thread Michael DeHaan
Hi Amr, Thanks very much for the contribution - we do have some specific ideas about what this would look like syntax wise and are planning on making something that requires a bit less boilerplate. As such, we are probably going to close your pull request. I have some ideas on what this should

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

2014-07-07 Thread Michael DeHaan
Perhaps I'm not understanding the question, but: group_vars/all group_vars/groupname1 group_vars/groupname2 etc This can be used with multiple inventory files if group_vars is a directory in the directory with both of them, which should be what you need. Let us know if this doesn't make sense

Re: [ansible-project] Impact of merging hashes

2014-07-07 Thread Michael DeHaan
I generally view it as over-complicated for most folks, but it is a supported thing and won't bite :) On Mon, Jul 7, 2014 at 11:58 AM, Mehul Ved mehul.n@gmail.com wrote: Hi, I am setting up a system using ansible where my configuration values are defined in defaults/main.yml. If the

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

2014-07-07 Thread Michael DeHaan
It seems like you're going to need another type of iterator (lookup plugin) that doesn't exist to traverse these, akin to something like a with_dict_items or something. I don't know your use cases, but another option might be to just make the data and fra stuff a element inside the hash. -

[ansible-project] 2014 Ansible Community Survey

2014-07-07 Thread Michael DeHaan
Hi everyone, It's time for another community survey. This one is much shorter than last time, and should probably take you 5 minutes. We'll use the result of this to know what features everyone is using most, among other things, which helps greatly with decision making and knowing who are the