# upgrading to ansible 2 mishaps

**URL:** <https://forum.ansible.com/t/upgrading-to-ansible-2-mishaps/20925>\
**Category:** Ansible Project\
**Created:** [March 18, 2016, 6:51pm UTC](https://forum.ansible.com/t/upgrading-to-ansible-2-mishaps/20925 "2016-03-18T18:51:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Muriithi](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@William\_Muriithi](https://forum.ansible.com/u/William_Muriithi)\
**Post date:** [March 18, 2016, 6:51pm UTC](https://forum.ansible.com/t/upgrading-to-ansible-2-mishaps/20925/1 "2016-03-18T18:51:30Z")

</div>

Hi,

I just updated from ansible 1.9 to ansible 2 and I am somehow managed  
to break my playbooks.

I can't seem to figure how whats wrong even after spending a good  
chunk of time with google

Any pointer on what could be wrong below:

[wmuriithi@dazzler ansible]$ ansible-playbook -s /etc/ansible/site.yml  
-vvv --user=uxp --limit 192.168.40.59 --tag mintbe

Using /etc/ansible/ansible.cfg as config file

[DEPRECATION WARNING]: Instead of sudo/sudo\_user, use  
become/become\_user and make sure become\_method is 'sudo' (default).  
This feature will be removed in a future release. Deprecation warnings  
can be disabled by setting deprecation\_warnings=False in ansible.cfg.

6 plays in /etc/ansible/site.yml

PLAY [Home keeping stuff] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

\<192.168.40.59\> ESTABLISH SSH CONNECTION FOR USER: uxp

\<192.168.40.59\> SSH: EXEC ssh -C -q -o ControlMaster=auto -o  
ControlPersist=60s -o KbdInteractiveAuthentication=no -o  
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey  
-o PasswordAuthentication=no -o User=uxp -o ConnectTimeout=10 -o  
ControlPath=/home/wmuriithi/.ansible/cp/ansible-ssh-%h-%p-%r -tt  
192.168.40.59 '( umask 22 && mkdir -p "$( echo  
$HOME/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348 )" && echo  
"$( echo $HOME/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348  
)" )'

\<192.168.40.59\> PUT /tmp/tmpIoZAIn TO  
/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup

\<192.168.40.59\> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o  
ControlPersist=60s -o KbdInteractiveAuthentication=no -o  
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey  
-o PasswordAuthentication=no -o User=uxp -o ConnectTimeout=10 -o  
ControlPath=/home/wmuriithi/.ansible/cp/ansible-ssh-%h-%p-%r  
'[192.168.40.59]'

\<192.168.40.59\> ESTABLISH SSH CONNECTION FOR USER: uxp

\<192.168.40.59\> SSH: EXEC ssh -C -q -o ControlMaster=auto -o  
ControlPersist=60s -o KbdInteractiveAuthentication=no -o  
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey  
-o PasswordAuthentication=no -o User=uxp -o ConnectTimeout=10 -o  
ControlPath=/home/wmuriithi/.ansible/cp/ansible-ssh-%h-%p-%r -tt  
192.168.40.59 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c  
'"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-woapaubbkoakapnsudzqztnyuszjgkpn;  
LANG=en\_CA.UTF-8 LC\_ALL=en\_CA.UTF-8 LC\_MESSAGES=en\_CA.UTF-8  
/usr/bin/python  
/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup;  
rm -rf "/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/"

> /dev/null 2\>&1'"'"'"'"'"'"'"'"''"'"''

fatal: [192.168.40.59]: FAILED! =\> {"changed": false, "failed": true,  
"invocation": {"module\_name": "setup"}, "module\_stderr": "",  
"module\_stdout": "Traceback (most recent call last):\r\n File  
\"/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup\",  
line 5121, in \<module\>\r\n main()\r\n File  
\"/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup\",  
line 120, in main\r\n data = get\_all\_facts(module)\r\n File  
\"/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup\",  
line 5066, in get\_all\_facts\r\n facts = ansible\_facts(module)\r\n  
File \"/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup\",  
line 5055, in ansible\_facts\r\n  
facts.update(Facts().populate())\r\n File  
\"/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup\",  
line 2218, in \_\_init\_\_\r\n self.get\_service\_mgr\_facts()\r\n File  
\"/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup\",  
line 2640, in get\_service\_mgr\_facts\r\n if  
self.\_check\_systemd():\r\n File  
\"/home/uxp/.ansible/tmp/ansible-tmp-1458326501.27-30466008725348/setup\",  
line 2764, in \_check\_systemd\r\n if  
module.get\_bin\_path('systemctl'):\r\nNameError: global name 'module'  
is not defined\r\n", "msg": "MODULE FAILURE", "parsed": false}

NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

192.168.40.59 : ok=0 changed=0 unreachable=0 failed=1

[wmuriithi@dazzler ansible]$ rpm -qa | grep ansible

ansible-2.0.0.2-0.git201601142217.7de237c.stable2001.el7.centos.noarch

Reagrds,

William
