$ cat hosts localhost ansible_connection=local
$ cat test.yml ---- hosts: localhost tasks: - name: test ping:
$ time ansible-playbook -i hosts test.yml
PLAY [localhost] **************************************************************
GATHERING FACTS *************************************************************** ok: [localhost]
TASK: [test] ****************************************************************** ok: [localhost]
PLAY RECAP ******************************************************************** localhost : ok=2 changed=0 unreachable=0 failed=0
real 2m1.637suser 0m0.266ssys 0m0.245s
$ uname -aDarwin Hostname.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Is it normal for this local ping to take two minutes?
--
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/4bc422a9-e27b-464b-b640-68c528b0ac7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Well you are doing a lot more thanansible localhost -m pingThe tool is doing all the gathering facts which can take some time and the recap rules.
--
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/8b106a0a-41e9-440f-bf33-ccda36643b9f%40googlegroups.com.
On 24 February 2015 at 17:09, Luís Marques <luism...@gmail.com> wrote:On Wednesday, February 25, 2015 at 12:01:30 AM UTC, Smooge wrote:Well you are doing a lot more thanansible localhost -m pingThe tool is doing all the gathering facts which can take some time and the recap rules.OK. I created this scenario to isolate the issue. But consider my actual scenario: I want to use the digitalocean module to create a droplet or to ensure it already exists. Something that would normally take about a second (if it already exists) with an ansible playbook would take two minutes. Is that the best I can do with Ansible? Am I doing something wrong?I think you are jumping to conclusions from way too little data :)Here is what happens doing exactly what you did on a CentOS-7 box running on a Intel Core Duo from 2009.[root@shizuku ~]# time ansible-playbook -i hosts test.ymlPLAY [localhost] **************************************************************GATHERING FACTS ***************************************************************ok: [localhost]TASK: [test] ******************************************************************ok: [localhost]PLAY RECAP ********************************************************************localhost : ok=2 changed=0 unreachable=0 failed=0real 0m1.347suser 0m0.705ssys 0m0.465stested this with 2 other systems that are even slower and they are all at 1.2 -> 1.5 seconds.So something is wrong on your setup.. what version of ansible are you using?
Just add gather_facts: false to your play.
Just add gather_facts: false to your play.
--
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/CAJ5XC8nPWiKz%2B-YShto2WWwufBpR5RJX%2B9Ggz%3DzPWOfckCvi0Q%40mail.gmail.com.
<localhost> u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /Users/luismarques/.ansible/tmp/ansible-tmp-1424825965.19-173089065311241/setup; rm -rf /Users/luismarques/.ansible/tmp/ansible-tmp-1424825965.19-173089065311241/ >/dev/null 2>&1']
I had tried to interrupt ansible (ctrl-C) and run that python command manually, and it had output some JSON after the two minutes (the facts?). It didn't show any intermediate debug output.
I'm running ansible 1.8.3.
Is the gather_facts flag the proper solution, or is it just a workaround?
Smooge: regarding your slow machines with fast execution, were you using "gather_facts: false"?
--
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/CAK5eLPSnSubWDaPMZ9EPZ3C%2BHQezR1o0y1OSsZLP2v%2BUembCdA%40mail.gmail.com.