Periodically, there is a problem with the ansible-playbook : for a very long time "hanging" on the setup task. Detailed mode did not say anything intelligible:

 TASK [setup] ******************************************************************* ESTABLISH LOCAL CONNECTION FOR USER: dmitry 127.0.0.1 EXEC /bin/sh -c '( umask 22 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464268193.51-68811809432139 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1464268193.51-68811809432139 `" )' 127.0.0.1 PUT /tmp/tmpD6mRtI TO /home/dmitry/.ansible/tmp/ansible-tmp-1464268193.51-68811809432139/setup 127.0.0.1 EXEC /bin/sh -c 'LANG=ru_RU.UTF-8 LC_ALL=ru_RU.UTF-8 LC_MESSAGES=ru_RU.UTF-8 /usr/bin/python /home/dmitry/.ansible/tmp/ansible-tmp-1464268193.51-68811809432139/setup; rm -rf "/home/dmitry/.ansible/tmp/ansible-tmp-1464268193.51-68811809432139/" > /dev/null 2>&1' 

How much time it takes is not exactly timed, but somewhere around 10-15 minutes, then the execution takes place at a normal pace.

Has anyone come across with how to treat?

    1 answer 1

    I think this is very similar to the very common problem "midnight commander takes a very long time to start" (the problem of name resolution - the host ip is not registered in the hosts) - and you have something wrong with the resolution of the host name. Plus for this version - that the host name resolved to 127.0.0.1 judging by your conclusion.

    I’m not going to tell you any more specifics: if the direction of solving a problem is guessed correctly, then you need to know how your network works in the enterprise — what are DNS servers, DHCP servers, what kind of environment, etc.

    • cat / etc / hosts 127.0.0.1 localhost 127.0.1.1 xxxxnelocalhost 127.0.1.1 xxxxxnelocalhost # The following lines are desirable for IPv6 capable hosts :: 1 ip6-localhost ip6-loopback fe00 :: 0 ip6-localnet ff00 :: 0 ip6-mcastprefix ff02 :: 1 ip6-allnodes ff02 :: 2 ip6-allrouters That's the whole "network in the enterprise") Plain laptop on linups ... PS I didn’t understand how to make line breaks , give up ... - Sviderskiy Dmitriy
    • one
      The 127.0.0.1 hostname.localdomain line in / etc / hosts is missing - AK
    • @AK Thanks, added. Because the problem does not occur all the time, it’s not possible to check the effect, but I hope the problem is completely gone. - Sviderskiy Dmitriy