[ansible-project] Re: 'tuple' object has no attribute 'iteritems'

2015-08-06 Thread candlerb
Which version of ansible? As a standalone test case, it works for me with ansible-1.7.1. brian@wrn-mon1:~$ cat test.yml - hosts: localhost tasks: - name: run syslog-ng version command: syslog-ng --version register: ver_out changed_when: false - name: set ver set

Re: [ansible-project] parallel execution of playbook at a time in multiple hosts

2015-08-06 Thread anandkumar
How to upgrade to ansible latest version? and how to solve the the following forks issue? Because i am very much struggling this issue? ansible-playbook ssh.yml --force-handlers --forks=100 PLAY [Transfer and execute a script.] * TASK: [Transfer the sc

Re: [ansible-project] parallel execution of playbook at a time in multiple hosts

2015-08-06 Thread Brian Coca
I don't know if this is a lack of memory, that normally gets a kernel message mentioning killing off processes, this looks like something much worse that is causing segfaults all over. >[2220566.328031] kernel BUG at /build/buildd/linux-3.13.0/mm/memory.c:1838! >[2220566.328031] invalid opcode: 00

[ansible-project] Re: how do fire handler with condition?

2015-08-06 Thread Ichiro MATSUNAGA
hi. thaks for many answer. i feel ugly a little for use 'when' (thanks Paul), and feel tricky to fire handler with condition (thanks Dick). i decide to restart service all enviroments. thanks. 2015年8月5日水曜日 22時27分57秒 UTC+9 Ichiro MATSUNAGA: > > Hi > > I want to fire handler with condition. > fo

Re: [ansible-project] parallel execution of playbook at a time in multiple hosts

2015-08-06 Thread anandkumar
Thanks you giving suggestion, I am having small issue that , I am having master node with 1GB ram so shall i extended to this ram to 2GB or more? Because you mentioned that previosly posted my issue is that cpu and ram usage.so shall i expanded to 2GB enough or more than this? while check dm

Re: [ansible-project] Re: how do fire handler with condition?

2015-08-06 Thread Paul Markham
Agreed, "environment" is probably a bad choice of variable names. We actually use a variable called "node_environment". On Friday, August 7, 2015 at 1:09:48 AM UTC+10, Brian Coca wrote: > > when: "'{{environment}}' != 'prod'" > > also i would not use environment as a variable as it can conflict

Re: [ansible-project] how to exit the ansible run, or handle it, when any remote node fails a task

2015-08-06 Thread Kathy Allen
Ah! Fantastic. Thank you. I put in max_fail_percentage, and the thing I wanted to happen happened. I do wonder about how to more elegantly handle one of the nodes failing, with a handler. Like something simple to start: "prompt: pause here, go fix that node if you can. If you can't, ctrl-c now.

Re: [ansible-project] how to exit the ansible run, or handle it, when any remote node fails a task

2015-08-06 Thread Karl E. Jorgensen
Hi On Thu, 2015-08-06 at 12:05 -0700, Kathy Allen wrote: > Hi. > > I'm working on some orchestration where I need to run a task across > sets of N remote nodes. If that task fails on any one of the remote > nodes, the orchestration needs to halt (or be handled somehow). In my > test, I cause one

[ansible-project] how to exit the ansible run, or handle it, when any remote node fails a task

2015-08-06 Thread Kathy Allen
Hi. I'm working on some orchestration where I need to run a task across sets of N remote nodes. If that task fails on any one of the remote nodes, the orchestration needs to halt (or be handled somehow). In my test, I cause one node to fail and I expected the entire ansible run to bomb out, but

Re: [ansible-project] Re: Not forking parrallel tasks?

2015-08-06 Thread Silvio Tomatis
Posting on an old thread, since I just had this same issue with ansible 1.9.2. In the end, I could solve it removing my persisted ssh connections like this rm ~/.ansible/cp/* I have no idea why exactly this solved the problem but in case you encounter the same issue you can try it. On Monday,

[ansible-project] User module hanging on ansible playbooks

2015-08-06 Thread Doug T
Strangely, our user module has begun to hang on creation of new user. We've never experienced this before and in most cases, multiple users are using the same ansible repo and some users run into the hang while others do not. And in the users that do see the issue, it seemingly comes and goes. E

Re: [ansible-project] Re: how do fire handler with condition?

2015-08-06 Thread Brian Coca
actually, let me correct myself, no mustaches needed in when: when: environment != 'prod' -- 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 t

Re: [ansible-project] Re: how do fire handler with condition?

2015-08-06 Thread Brian Coca
when: "'{{environment}}' != 'prod'" also i would not use environment as a variable as it can conflict with the keyword. On Thu, Aug 6, 2015 at 4:54 AM, Paul Markham wrote: > We have this requirement as well. We just put a when condition on the task > in the handler to only restart the service

Re: [ansible-project] Is there a simple way to find host groups for a role?

2015-08-06 Thread Greg DeKoenigsberg
--list-hosts option is what you want. On Aug 6, 2015 8:34 AM, "Sergey Maslyakov" wrote: > Given an Ansible playbook, is there a simple way to list out all host > groups that a given roles belongs to? > > My roles install applications using RPMs. If there is a fix in an > application, I need to kn

Re: [ansible-project] parallel execution of playbook at a time in multiple hosts

2015-08-06 Thread Brian Coca
The mono threaded resolver was a hypothetical, i doubt any really exist, unless someone was debugging the resolver and forgot to revert the concurrency settings. what do you mean by 'struggles to be established'? -- Brian Coca -- You received this message because you are subscribed to the Goo

Re: [ansible-project] Re: Ansible not pulling in group_vars

2015-08-06 Thread datsun80
I ended up reverting back to my old file structure to continue working on other projects. I just now tried again by moving the inventories to their own directory and to my surprise they are now pulling in the group vars. Not sure what I did before, but it is working now. -- You received this m

Re: [ansible-project] Re: Environment specific files

2015-08-06 Thread Brian Coca
don't use environment as a variable, as it is an existing directive and can cause confusion ( i use myenv) -- 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

[ansible-project] update ansible roles from playbook

2015-08-06 Thread Vasilii Alferov
I am working on ansible playbook to deploy our software, which in turn includes some ansible automation part. Can anybody suggest a way to update an ansible role from git before running it, solving bootstrap problem. Best regards, Vasilii -- You received this message because you are subscribe

[ansible-project] Adding facts module

2015-08-06 Thread Marcin Stolarek
Hi, At our site we found interesting to have a facts module providing information about network interfaces configuration available via DHCP. This can be used to write a static configuration basing on current DHCP (we use fixed address in DHCP configuration) or to compare current resolvers, ne

[ansible-project] Triggering handlers from role dependency

2015-08-06 Thread mike
Hi, I'm trying to find out what would be the best way to trigger a handler if something in a role dependency changed. The scenario is quite common I think, and goes like this: - Role jvm - Role application1 (depending on jvm) - Role application2 (depending on jvm) If the JVM gets updated, appl

[ansible-project] Is there a simple way to find host groups for a role?

2015-08-06 Thread Sergey Maslyakov
Given an Ansible playbook, is there a simple way to list out all host groups that a given roles belongs to? My roles install applications using RPMs. If there is a fix in an application, I need to know what servers I should update. Thank you, /Sergey -- You received this message because you

[ansible-project] Re: how do fire handler with condition?

2015-08-06 Thread Paul Markham
We have this requirement as well. We just put a when condition on the task in the handler to only restart the service if it's not prod. You need to have the environment in a variable for this to work. e.g. this may not be the 100% correct syntax as I'm not at work, but we do something like: h

Re: [ansible-project] how to use variables from one role in another role

2015-08-06 Thread Stri}{
If I use var/main.yml for storing variables, all works fine (variables from Role A and B seen in each role). I want to symplify code in my roles and move generic code to separate role or playbook. Then I want to pass some variables from roles to this playbook (for creating directory structure, f

Re: [ansible-project] parallel execution of playbook at a time in multiple hosts

2015-08-06 Thread Florent Dutheil
Thanks for your suggestion Brian. As I stated, I've looked at the CPU & RAM usage, they were perfectly fine. I'll see if network is limiting anything, but I have some doubts: it's a entreprise wired LAN, and the logical behaviour of a bandwith limited ansible would be: - phase 1: many DNS re

Re: [ansible-project] Serial across groups

2015-08-06 Thread David Edmonds
Ah, nice! That certainly does the trick. Thanks for your help. David On Friday, 31 July 2015 14:22:06 UTC+1, Brian Coca wrote: > > try: > > hosts: *01:*02:*03 > serial:2 > > On Fri, Jul 31, 2015 at 3:57 AM, David Edmonds > wrote: > > Hi, > > > > I'm working on a deployment playbook at the