[ansible-project] Ansible 1.9.4 has been released

2015-10-09 Thread James Cammarata
Hi all, 1.9.4 has been released, and is now available.

This release addresses several bugs, most notably those related to the yum
module (introduced in 1.9.3):

* Fixes a bug where yum state=latest would error if there were no updates
to install.
* Fixes a bug where yum state=latest did not work with wildcard package
names.
* Fixes a bug in lineinfile relating to escape sequences.
* Fixes a bug where vars_prompt was not keeping passwords private by
default.
* Fix ansible-galaxy and the hipchat callback plugin to check that the host
it
  is contacting matches its TLS Certificate.

As always, this update is available via PyPi and releases.ansible.com now,
and packages for distros will be available as soon as possible.

Thanks, and enjoy!

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAMFyvFiLjTw4hpK-fAg_yRTogDXWPZs04GctrF4TP0Z6OLpReA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Adding dict key + value

2015-10-09 Thread Guy Knights
I'm trying to add a new key to an existing dictionary but I'm having some 
trouble. I have this set_fact task:

- set_fact:
ha.listeners.backends[item.key].servers="{{ groups[item.key] }}"
  with_dict: ha.listeners.backends

It runs through without complaining, but when I debug the car there's new 
data isn't in the dict. Is it even possible to do what I'm trying to do?

Thanks,
Guy

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4950967a-b95a-417a-b599-43dfd9aa7926%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Slow fact gathering or slow winrm on windows hosts

2015-10-09 Thread Trond Hindenes
That's unusual. For non-wan connections we are usually looking at max 3 
seconds for the setup module. What happens when you set up a psremoting 
session from a windows computer to the same nodes, hows performance?

On Friday, October 9, 2015 at 6:50:56 PM UTC+2, Brian Coca wrote:
>
> there is no plan to allow per task serial, it is not a feature in 2.0. 
>
> you can easily add a play in the middle of a playbook for such tasks 
> that need a change in the 'serial' setting 
>
> -- 
> 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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a1f9e147-29c3-4751-be34-42080c9e71ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Memory usage and requirements - oom-kill victim

2015-10-09 Thread Robert Lupinek
Enter code here...


---
- hosts: all
  remote_user: root
  serial: 20
  tasks:
  - name: Install nscd
yum: pkg=nscd state=latest disable_gpg_check=no
  - name: Transfer the conf file
copy: src=files/etc/nscd.conf dest=/etc/nscd.conf mode=0644 backup=yes
  - name: Configure service...
service: name=nscd state=restarted enabled=yes
  - name: Ensure nscd is started at boot time
action: command /sbin/chkconfig nscd on
  - name: deploy standard resolv.conf
copy: src=files/etc/resolv.conf dest=/etc/resolv.conf mode=0644 backup=
yes




My files are pretty tiny:

mst_nscd]# ls -la files/etc/
total 16
drwxr-xr-x 2 root root 4096 Oct  2 18:58 .
drwxr-xr-x 3 root root 4096 Aug 31 18:21 ..
-rw-r--r-- 1 root root  833 Sep  1 20:40 nscd.conf
-rw-r--r-- 1 root root   96 Oct  2 15:07 resolv.con


I am running the /sbin/chkconfig nscd on because the enabled = is not 
working because I assumed I was running into 
this: https://github.com/ansible/ansible-modules-core/issues/237.

Thank you all for the kind responses!

On Friday, October 9, 2015 at 11:21:08 AM UTC-4, Brian Coca wrote:
>
> can you show the play that is producing this issue?  Plenty of people 
> use the yum module with those versions and do not report such an 
> issue. 
>
>
>
> -- 
> 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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5c2f41b0-e404-4e97-8118-3b01736762fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Include unexisting files

2015-10-09 Thread James Cammarata
Correct, this is not possible with playbook-level includes, however you
could do it with task-level includes in 2.0.

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

On Fri, Oct 9, 2015 at 3:46 AM, Dan C  wrote:

> Thanks David.
> I think it would be a nice feature.
> Right now I suppose that I could just run ansible-playbook from within the
> ansible playbook which would run the "
> */this/file/does/not/exist/yet/configure.yml*" playbook. It should work,
> shouldn't it? But it even sound so awfull ! ;-)
>
> El jueves, 8 de octubre de 2015, 18:34:37 (UTC+2), David Karban escribió:
>>
>> Hi,
>>
>> not possible on 1.9. version, do not know, if on 2.0.
>>
>> David Karban
>> Linux server specialist/Specialista na správu linuxových serverů
>> www.karban.eu
>>
>> 2015-10-08 18:19 GMT+02:00 Dan C :
>>
>>> Hi,
>>>
>>> Does someone know if and how to include plays that does not exist at the
>>> execution time?
>>> For example.
>>> *main.yml*
>>>
>>> - include: download.yml
>>>
>>> - include: /this/file/does/not/exist/yet/configure.yml
>>>
>>>
>>> I would like to download some files. After *download.yml* finishes the
>>> file "*/this/file/does/not/exist/yet/configure.yml*" will exist, but
>>> not before. I would like to include the *configure.yml* file which will
>>> be an ansible playbook.
>>>
>>> Is it possible?
>>>
>>> --
>>> 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-proje...@googlegroups.com.
>>> To post to this group, send email to ansible...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/f819c896-7308-4742-b7ac-376902a5d5d0%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/da60675f-11c4-4e3d-a5e0-e14501e81049%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAMFyvFisGuKWgNiURMqAGatVF4CMZCxOe-Q2eMvGa%2BgKD182Fg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Memory usage and requirements - oom-kill victim

2015-10-09 Thread James Cammarata
Yes, this appears to be similar to the bug SVG pointed out, which I've
tracked down to being related to the way python queues use pickle to
serialize dictionary data (the resulting size of the data can be 200x than
it was in the dictionary before). I'm currently working on a solution to
this, and hope to include it in the next beta round.

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

On Fri, Oct 9, 2015 at 11:23 AM, Serge van Ginderachter <
se...@vanginderachter.be> wrote:

> In my experience, OOM's happen when the inventory is large, especially
> when having lots of variables in the inventory, combined with lots (several
> hundreds) of hosts.
>
> Not very scientific, but to get a rough idea on the size of your
> inventory, could you show the output of
>
>
> $ time (ansible all -m debug -a var=hostvars |wc -l ; ansible all
> --list-hosts |wc -l)
> 19788298
> 1046
>
> real2m3.222s
> user6m54.500s
> sys0m7.772s
>
>
> Mine would yield 19.788.298 hostvars lines for 1046 hosts.
>
> That used to be a lot more, before I made some optimisations on a dynamic
> inventory script that calculated a bunch of variables:
>
> $ ansible all -m debug -a var=hostvars |wc -l ; ansible all --list-hosts
> |wc -l
> 95924259
> 1037
> (that last job took 17 minutes to run, on an i7 quadcore laptop )
>
>
>
> Possibly, see also https://github.com/ansible/ansible/issues/12239
>
>
>
>
> On 9 October 2015 at 16:48, Robert Lupinek  wrote:
>
>> Ok,
>>
>> On the RHEL 7 host my versions are as follows:
>>
>> 1. ansible =ansible 1.9.3
>> 2. PythoPython = 2.7.5
>>
>>   On the RHEL 6 host my versions are as follows:
>>
>> 1. ansible = ansible 1.9.2
>> 2. Python = Python 2.6.6
>>
>> I will report back once I can start monitoring malloc.
>>
>> --
>> 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-project@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/977bc078-311d-4ab5-9796-5bf9e108c228%40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAEhzMJAVMxbeDkmuGFfXTmriM4Q-jZODa3ztxnXRVK6eh1-1Ww%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAMFyvFhJkonE-9ZALufgHVc_YpGPYJfPQha8V-zFPx_oHr-gMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Disable Nagios Alerts

2015-10-09 Thread Dimitri Yioulos
Veera,

I got your request for an example off-list, but thought I'd post it here:

---

- hosts: all
  gather_facts: true
#  sudo: yes

  tasks:
- nagios: action=downtime minutes=5 author="Dimitri Yioulos" 
service=host host={{item}}
  with_items: "{{ groups['test'] }}"
  delegate_to: admin2
  tags:
 - nagios_downtime
- nagios: action=downtime minutes=5 author="Dimitri Yioulos" 
service=all host={{item}}
  with_items: "{{ groups['test'] }}"
  delegate_to: admin2
  tags:
 - nagios_downtime

These tasks put all of the hosts in the 'test' group, and their services, 
in Downtime for five minutes.  The Nagios server is admin2.  With hosts and 
their services in Downtime I can, of course, reboot the hosts without 
setting off alerts.

HTH.

Dimitri 

On Friday, October 2, 2015 at 7:45:08 AM UTC-4, veera kumar wrote:
>
> Hi All,
>
> Can anyone tell me how to automatically disable nagios and new relic 
> alerts using ansible playbook. If possible please provide some samples.
>
> Thanks in advance.
>
> Regards,
> Veera
>

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/add2aeb8-6d50-4731-b880-2b68be94baae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Configuration error: No MPM loaded when using validate in apache role

2015-10-09 Thread Brian Coca
it does not, that is my point


-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8%3Dc-5zk4%2BHV9OWjSSgkyoRgmsu7WfZEqRGXbVDvrT2%3DTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] 1.9.3 broken service on Ubuntu 14.04.2 LTS

2015-10-09 Thread razvan
Hi,

It seems this bug reappear in 1.9.3:

- name: restart php5-fpm
  service: name=php5-fpm state=restarted


does not works anymore, again, I need it to temporary fix with:

# - name: restart PHP-FPM
#   service: name=php5-fpm state=restarted
- name: restart php-fpm
  command: service php5-fpm restart


Best,
R

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/634bad3d-f3ef-478e-944f-fbce08d29c00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Configuration error: No MPM loaded when using validate in apache role

2015-10-09 Thread Joseph Djomeda
Hello All,

I have tried with single configuration this time but it didn't work still.
I get the part it checks before but in my case I was not even using it.
it's part of a include file task that would get skipped anyway. So am not
too sure how to make this compatible with my
include_file_based_on_condition bit.

How does that work?

Best Regards,

On Fri, Oct 9, 2015 at 3:53 PM Joseph Djomeda  wrote:

> Hello Brian,
>
> Thank you.
>
> On Fri, Oct 9, 2015 at 3:33 PM Brian Coca  wrote:
>
>> validate checks the file BEFORE putting it into place, since you are
>> using a multifile configuration, the validation will always fail as it
>> is missing the rest of the apache config.
>>
>>
>> validate is only useful with single file configurations
>>
>> --
>> 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 post to this group, send email to ansible-project@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nzwE1e7pO9EeQr%3DguO9uGiOHWKSwiyEAPO6UuNHY6JTg%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Joseph Kodjo-Kuma Djomeda
> check out my pains at : www.mycodingpains.com
> We become what we think about ourselves
>
-- 
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKDXoaKgu6Lb1tWsM1puGVELyAKBJ%3DruBTGV6X_nf7h-YYEMnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Playbook organization with var files

2015-10-09 Thread Brian Coca
you can already set plugins paths in ansible.cfg, as for
group/host_vars they are also relative to inventory, which I guess you
share across plays, so it all can already be organized 'globally'


-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8k6qtU0x8NQe9Jet5xntLr1KkQ1743V55U0kb5sghJORQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] group name from variable

2015-10-09 Thread Brian Coca
with_items: "{{ groups[ALLOWED_HOSTS_GROUP] }}"



-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nS8Fpm-N2troWrKf-qjWeWb8eX-oYQO31qnej0sVbtvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: List of Ansible default variables

2015-10-09 Thread Kale Franz
Brian,

This is incredibly useful info and could be helpful to add to the official 
documentation.

Similar to the play_hosts variable, is there something like a "play_roles" 
variable that is an ordered list of roles for the current play?  I'd like 
to be able to trigger certain behavior (restarts and such) based on the 
presence or absence of particular roles in that list.


On Friday, September 4, 2015 at 9:51:32 AM UTC-7, Brian Coca wrote:
>
> You seem to want the play_hosts variable (current active hosts in current 
> play). 
>
> On Fri, Sep 4, 2015 at 12:44 PM, James Morgan  > wrote: 
> > Ok thanks, 
> > 
> > I think I will need to pass it through from the playbook, the issue is 
> that 
> > on a flat deployment where every group has the same host, when I use 
> > group_names I get all possible groups, not the one currently being 
> handled. 
> > 
> > This meant that I ended up with a duplicate list of about 12 hosts. Is 
> it 
> > possible to append to a list in jinja. If so I could loop over 
> groups_names, 
> > then over the hosts in that group and build up a list of hosts then uniq 
> the 
> > list 
> > 
> > {% for group in group_names %} 
> >   {% for host in groups[group] %} 
> >    
> > 
> > 
> >  
> >   SetHandler otas-handler 
> > 
> >   OTASHost 172.31.5.20 19202 
> > 
> >   OTASHost 172.31.5.20 19202 
> > 
> >   OTASHost 172.31.5.20 19202 
> > 
> >   OTASHost 172.31.5.20 19202 
> >   . 
> > 
> > Thanks for the consise list of the others, very useful. 
> > 
> > On Friday, 4 September 2015 16:46:12 UTC+1, Brian Coca wrote: 
> >> 
> >> current_host = inventory_hostname 
> >> current_group = no singular, we always flatten to host, you can check 
> >> the current host's groups in "group_names" list of the current host 
> >> current_user =  lookup('env', 'USER') ? 
> >> current_task = nothing represents the current task .. since you are in 
> >> the current task ..., not sure what you want here. 
> >> current_role =  role_path|basename 
> >> 
> >> 
> >> -- 
> >> 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-proje...@googlegroups.com . 
> > To post to this group, send email to ansible...@googlegroups.com 
> . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/9aaf2756-36e6-43f1-bb5a-a8b6d6a1c076%40googlegroups.com.
>  
>
> > 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> 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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a0a81602-d4b9-4765-bb80-45970f7bd3e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Slow fact gathering or slow winrm on windows hosts

2015-10-09 Thread Brian Coca
there is no plan to allow per task serial, it is not a feature in 2.0.

you can easily add a play in the middle of a playbook for such tasks
that need a change in the 'serial' setting

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mvVDh%2BzCzu2kqRXD2N9XhFcwefv_m_xtcErzDQxX7M%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Slow fact gathering or slow winrm on windows hosts

2015-10-09 Thread Michael Baydoun
All servers are local in this building.  Will look at increasing forks even
more than we already have, though limited in what we can do until 2.0 is
released and allows for per task serial values.

On Fri, Oct 9, 2015 at 12:02 PM Trond Hindenes  wrote:

> There's no getting around the fact that winrm is a much slower protocol
> than ssh. Those numbers seem unreasonably high tho. Any chance you're using
> a local ansible control node against cloud-based windows servers?
>
> You could also consider speeding up your playbooks using the "forks" (
> http://www.ansible.com/blog/ansible-performance-tuning)
>
>
> On Friday, October 9, 2015 at 3:46:52 PM UTC+2, Michael Baydoun wrote:
>>
>> A few of our windows hosts take 20-30 seconds to gather facts, and that's
>> the good news.  The other hosts take > 1 minute just to gather facts.
>> When run with -, it appears to me that every winrm step just takes a
>> long time.
>>
>> Has anyone run into this?  Suggestions?  Adding each windows host to our
>> inventory is causing painful increases in site.yml run time.
>> Note: running ansible 1.9.2, and hoping 2.0 will improve the situation
>> when it's released
>>
>> I wrote a test to gather run times for fact gathering, results for
>> windows hosts below (with hostnames removed)
>>
>> min:sec:hundredths
>> 0:26.66
>> 1:13.46
>> 1:15.47
>> 1:14.77
>> 1:33.89
>> 0:32.68
>> 2:44.04
>> 1:34.65
>> 1:30.29
>> 1:25.71
>> 0:29.66
>> 0:25.86
>> 1:08.95
>> 1:09.38
>> 0:21.88
>> 0:24.47
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/jruWTjOrC5w/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/52345e1c-fe15-477d-9e72-799ec00b5814%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADgbg8KwH9FjJSTfWkn82Jtg%2BBqtPbeySBYe42EkLZSjdXm7Rw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] group name from variable

2015-10-09 Thread francesco . savignago
Hi!
I would like to run a role something like

- name: debug role
  debug: msg="{{ hostvars[item].ansible_host }}"
  with_items: groups[ {{ALLOWED_HOSTS_GROUP}} ]

however the syntax groups[ {{ALLOWED_HOSTS_GROUP}} ] is not accepted.
Is there any other way to pass a group name from a variable defined e.g. in 
a playbook?

Thanks for your support.

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f2a8db39-063f-4810-affa-4ae9262d16f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Slow fact gathering or slow winrm on windows hosts

2015-10-09 Thread Trond Hindenes
There's no getting around the fact that winrm is a much slower protocol 
than ssh. Those numbers seem unreasonably high tho. Any chance you're using 
a local ansible control node against cloud-based windows servers?

You could also consider speeding up your playbooks using the "forks" 
(http://www.ansible.com/blog/ansible-performance-tuning)

On Friday, October 9, 2015 at 3:46:52 PM UTC+2, Michael Baydoun wrote:
>
> A few of our windows hosts take 20-30 seconds to gather facts, and that's 
> the good news.  The other hosts take > 1 minute just to gather facts.  
> When run with -, it appears to me that every winrm step just takes a 
> long time.
>
> Has anyone run into this?  Suggestions?  Adding each windows host to our 
> inventory is causing painful increases in site.yml run time.
> Note: running ansible 1.9.2, and hoping 2.0 will improve the situation 
> when it's released
>
> I wrote a test to gather run times for fact gathering, results for windows 
> hosts below (with hostnames removed)
>
> min:sec:hundredths 
> 0:26.66
> 1:13.46
> 1:15.47
> 1:14.77
> 1:33.89
> 0:32.68
> 2:44.04
> 1:34.65
> 1:30.29
> 1:25.71
> 0:29.66
> 0:25.86
> 1:08.95
> 1:09.38
> 0:21.88
> 0:24.47
>
>

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/52345e1c-fe15-477d-9e72-799ec00b5814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Configuration error: No MPM loaded when using validate in apache role

2015-10-09 Thread Joseph Djomeda
Hello Brian,

Thank you.

On Fri, Oct 9, 2015 at 3:33 PM Brian Coca  wrote:

> validate checks the file BEFORE putting it into place, since you are
> using a multifile configuration, the validation will always fail as it
> is missing the rest of the apache config.
>
>
> validate is only useful with single file configurations
>
> --
> 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 post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nzwE1e7pO9EeQr%3DguO9uGiOHWKSwiyEAPO6UuNHY6JTg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKDXoa%2BBcxku907oU2byJzd8XmhxiKkKrNN80REqDF1D%2BGUA1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Configuration error: No MPM loaded when using validate in apache role

2015-10-09 Thread Brian Coca
validate checks the file BEFORE putting it into place, since you are
using a multifile configuration, the validation will always fail as it
is missing the rest of the apache config.


validate is only useful with single file configurations

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nzwE1e7pO9EeQr%3DguO9uGiOHWKSwiyEAPO6UuNHY6JTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Configuration error: No MPM loaded when using validate in apache role

2015-10-09 Thread Joseph Djomeda
Hello Guys,

I am sure this is a little issue many of you have already solve but I seem
stuck about this rc:1 error:AH00534: apache2: Configuration error: No MPM
loaded when I use validate in tempate module of my apache role.

Everything works file when commented out. Looks like so many fix on google
, some about making getting the mpm module used (depends on OS) and using
the right one, but it seems ubuntu node which I am using is nicely
configured with those defaults so I am out of options here.

My work in on pastie.org 

Kindly shed some light on what I am doing wrong.

Best Regards,
-- 
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKDXoa%2BKrhDs93VEEFq62OvjmLKuGu5_Wyp19J-tX_YzbFMi0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Memory usage and requirements - oom-kill victim

2015-10-09 Thread Serge van Ginderachter
In my experience, OOM's happen when the inventory is large, especially when
having lots of variables in the inventory, combined with lots (several
hundreds) of hosts.

Not very scientific, but to get a rough idea on the size of your inventory,
could you show the output of


$ time (ansible all -m debug -a var=hostvars |wc -l ; ansible all
--list-hosts |wc -l)
19788298
1046

real2m3.222s
user6m54.500s
sys0m7.772s


Mine would yield 19.788.298 hostvars lines for 1046 hosts.

That used to be a lot more, before I made some optimisations on a dynamic
inventory script that calculated a bunch of variables:

$ ansible all -m debug -a var=hostvars |wc -l ; ansible all --list-hosts
|wc -l
95924259
1037
(that last job took 17 minutes to run, on an i7 quadcore laptop )



Possibly, see also https://github.com/ansible/ansible/issues/12239




On 9 October 2015 at 16:48, Robert Lupinek  wrote:

> Ok,
>
> On the RHEL 7 host my versions are as follows:
>
> 1. ansible =ansible 1.9.3
> 2. PythoPython = 2.7.5
>
>   On the RHEL 6 host my versions are as follows:
>
> 1. ansible = ansible 1.9.2
> 2. Python = Python 2.6.6
>
> I will report back once I can start monitoring malloc.
>
> --
> 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-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/977bc078-311d-4ab5-9796-5bf9e108c228%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEhzMJAVMxbeDkmuGFfXTmriM4Q-jZODa3ztxnXRVK6eh1-1Ww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Memory usage and requirements - oom-kill victim

2015-10-09 Thread Brian Coca
can you show the play that is producing this issue?  Plenty of people
use the yum module with those versions and do not report such an
issue.



-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mS%3D26Ai31Fegfs_RXJT3kxcvaA_m7m6xoHj0u5QcQcmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Playbook organization with var files

2015-10-09 Thread Mike Biancaniello
I have the same issues trying to manage a ton of playbooks that all use the
same resources (which is how I stumbled upon this). However, after reading
the comments, I think I better understand where Ansible is coming from.

(people who know I'm sure will correct me if I'm wrong)

It seems as though Ansible considers each playbook tied to an inventory and
group_vars are also explicitly tied to inventory. Therefore, it would
reason that if you want to logically separate your playbooks into
subdirectories, the separation should be along inventory boundaries such
that the group_vars/ mostly do not need to be shared between playbook
subdirs. Furthermore, if you do have resources that are shared
(./group_vars/all, ./library/, ./filter_plugins/, &c), then you can
accomplish this with symlinks.

That being said, it would be nice to have an option for ansible-playbook
that set a reference directory.

e.g.

$ ansible-playbook -i thesehosts playbooks/thesehosts/this_playbook.yml
--shared_dir=.

or

$ ANISBLE_PATH=. ansible-playbook -i thesehosts
playbooks/thesehosts/this_playbook.yml

which would avoid the need for symlinks.

Of course ... could all of this be avoided if we put ALL shared resources
in /etc/ansible/ ? roles, group_vars, filter_plugins, &c?

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADBUY_iXJw7Bie%3DMZhrqFSdCo1FyH5oFhN-iXL%2BbZYsFUVsFvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Memory usage and requirements - oom-kill victim

2015-10-09 Thread Robert Lupinek
Ok,  

On the RHEL 7 host my versions are as follows:

1. ansible =ansible 1.9.3
2. PythoPython = 2.7.5 

  On the RHEL 6 host my versions are as follows:

1. ansible = ansible 1.9.2
2. Python = Python 2.6.6 

I will report back once I can start monitoring malloc.

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/977bc078-311d-4ab5-9796-5bf9e108c228%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Slow fact gathering or slow winrm on windows hosts

2015-10-09 Thread Michael Baydoun
A few of our windows hosts take 20-30 seconds to gather facts, and that's 
the good news.  The other hosts take > 1 minute just to gather facts.  
When run with -, it appears to me that every winrm step just takes a 
long time.

Has anyone run into this?  Suggestions?  Adding each windows host to our 
inventory is causing painful increases in site.yml run time.
Note: running ansible 1.9.2, and hoping 2.0 will improve the situation when 
it's released

I wrote a test to gather run times for fact gathering, results for windows 
hosts below (with hostnames removed)

min:sec:hundredths 
0:26.66
1:13.46
1:15.47
1:14.77
1:33.89
0:32.68
2:44.04
1:34.65
1:30.29
1:25.71
0:29.66
0:25.86
1:08.95
1:09.38
0:21.88
0:24.47

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2ddc37d3-8197-47ed-ab9d-0b1c00331c89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] module to release floating ips in openstack?

2015-10-09 Thread Tim Rupp
Hey folks,

Is anyone aware of a module that can be used to release floating ip 
addresses allocated to a project? There is an os_floating_ip module, but it 
only looks like it handles attaching and detaching them. I specifically 
want to release one if it was allocated to my project.

Thanks,
tim

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1edd5a90-8af5-43ad-bb0b-9d002e62814d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Create GCE instances msg: Unexpected response: {}

2015-10-09 Thread Anatoliy Kovalenko
I have the same issue. I use a gce_module of ansible which uses 
apache-libcloud. When I try to run a google instance, I get an error - 
failed: [localhost] => {"changed": false, "failed": true} msg: Unexpected 
response: {} 

What can possibly cause it?

On Saturday, January 24, 2015 at 9:59:50 PM UTC+2, Faisal Rabbani wrote:
>
> Hi,
> I am trying to create new instance via ansible gce module but getting this 
> message:
>
> PLAY [localhost] 
> **
>
> TASK: [Launch instances] 
> **
> failed: [localhost -> 127.0.0.1] => {"changed": false, "failed": true}
> msg: Unexpected response: {}
>
> FATAL: all hosts have already failed -- aborting
> This is my playbook:
>   local_action:
> module: gce
> name: test-instance
> zone: us-central1-a
> machine_type: f1.micro
> image: ubuntu-14-10
> service_account_email: @
> developer.gserviceaccount.com
> pem_file: /root/.ssh/key
> project_id: 234sda
> register: gce
>
>

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c547c67c-d179-4c94-bc49-22e520712a90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Include unexisting files

2015-10-09 Thread Dan C
Thanks David.
I think it would be a nice feature.
Right now I suppose that I could just run ansible-playbook from within the 
ansible playbook which would run the "
*/this/file/does/not/exist/yet/configure.yml*" playbook. It should work, 
shouldn't it? But it even sound so awfull ! ;-)

El jueves, 8 de octubre de 2015, 18:34:37 (UTC+2), David Karban escribió:
>
> Hi, 
>
> not possible on 1.9. version, do not know, if on 2.0.
>
> David Karban
> Linux server specialist/Specialista na správu linuxových serverů
> www.karban.eu
>
> 2015-10-08 18:19 GMT+02:00 Dan C >:
>
>> Hi,
>>
>> Does someone know if and how to include plays that does not exist at the 
>> execution time?
>> For example.
>> *main.yml*
>>
>> - include: download.yml
>>
>> - include: /this/file/does/not/exist/yet/configure.yml
>>
>>
>> I would like to download some files. After *download.yml* finishes the 
>> file "*/this/file/does/not/exist/yet/configure.yml*" will exist, but not 
>> before. I would like to include the *configure.yml* file which will be 
>> an ansible playbook.
>>
>> Is it possible?
>>
>> -- 
>> 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-proje...@googlegroups.com .
>> To post to this group, send email to ansible...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/f819c896-7308-4742-b7ac-376902a5d5d0%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/da60675f-11c4-4e3d-a5e0-e14501e81049%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.