# "msg": "\[Errno 2\] No such file or directory" While Update task in Playbook

**URL:** <https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [February 9, 2018, 4:52pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698 "2018-02-09T16:52:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hemant\_Kulkarni](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Hemant\_Kulkarni](https://forum.ansible.com/u/Hemant_Kulkarni)\
**Post date:** [February 9, 2018, 4:52pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698/1 "2018-02-09T16:52:24Z")

</div>

Hello All,

Hello Team,  
I am new in Ansible , I have playbook task in which it will update mysql DB Record & complete.  
but its showing me blow error , I am not sure what it could be …  
“rc”: 2,  
“msg”: “[Errno 2] No such file or directory”

##### ENVIRONMENT

- AWX version: 1.0.3.29
- AWX install method: , docker on linux .
- Ansible version: Ansible 2.4.3.0
- Operating System:-CentOS Linux release 7.4.1708 (Core)

do I need to install any additional packges inside docker image , if yes how I do that …

Regards..Hemant

---

<div class="post-metadata">

**Author:** ![jmitchel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jmitchel/32/10148_2.png) [@jmitchel](https://forum.ansible.com/u/jmitchel)\
**Post date:** [February 9, 2018, 5:38pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698/2 "2018-02-09T17:38:26Z")

</div>

Can you run with a higher verbosity set on the job template? Also this mailing list is for AWX-specific issues, you would probably have more prompt responses if you ask in the #ansible irc channel

---

<div class="post-metadata">

**Author:** ![Hemant\_Kulkarni](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Hemant\_Kulkarni](https://forum.ansible.com/u/Hemant_Kulkarni)\
**Post date:** [February 9, 2018, 6:20pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698/3 "2018-02-09T18:20:03Z")

</div>

Hello Team,

below is output –

ansible-playbook 2.4.3.0  
config file = /etc/ansible/ansible.cfg  
configured module search path = [u’/var/lib/awx/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/site-packages/ansible  
executable location = /usr/bin/ansible-playbook  
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]  
Using /etc/ansible/ansible.cfg as config file

PLAYBOOK: hem.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in hem.yml

PLAY [127.0.0.1] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [127.0.0.1]  
META: ran handlers

TASK [Update My Sql database] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /var/lib/awx/projects/vmware/hem.yml:7  
fatal: [127.0.0.1]: FAILED! =\> {“changed”: false, “cmd”: “mysql -h (mydbhost) -u root -p(dbpass) SAS -e 'UPDATE abc SET status = '\”‘\“‘Completed’\”’\“’ WHERE Name = '\”‘\“‘TEST5’\”’\“‘;’”, “msg”: “[Errno 2] No such file or directory”, “rc”: 2}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
127.0.0.1 : ok=1 changed=0 unreachable=0 failed=1

---

<div class="post-metadata">

**Author:** ![jmitchel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jmitchel/32/10148_2.png) [@jmitchel](https://forum.ansible.com/u/jmitchel)\
**Post date:** [February 9, 2018, 6:29pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698/4 "2018-02-09T18:29:11Z")

</div>

Seems to me like probably a syntax error of some sort with your MySQL command. Since you are running using the cmd module from local host, that’s just like running a command on the command line. I would debug by running the MySQL command from the command line and seeing if you get the same sort of errors. Go from there, googling the error messages you are getting with “mysql” and seeing what sorts of similar things people have ran into and what they’ve done to fix.

---

<div class="post-metadata">

**Author:** ![Hemant\_Kulkarni](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Hemant\_Kulkarni](https://forum.ansible.com/u/Hemant_Kulkarni)\
**Post date:** [February 9, 2018, 8:26pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698/5 "2018-02-09T20:26:08Z")

</div>

Hello Team,

Just an Update , I have installed MYSQL Package inside my (ansible/awx\_task:latest) using yum install mysql command & my Playbook is working now …

Regards…Hemant

---

<div class="post-metadata">

**Author:** ![jmitchel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jmitchel/32/10148_2.png) [@jmitchel](https://forum.ansible.com/u/jmitchel)\
**Post date:** [February 9, 2018, 8:29pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698/6 "2018-02-09T20:29:51Z")

</div>

Glad you were able to figure it out!

John

---

<div class="post-metadata">

**Author:** ![sharada\_Nagarkar](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sharada\_Nagarkar](https://forum.ansible.com/u/sharada_Nagarkar)\
**Post date:** [September 12, 2018, 8:58am UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698/7 "2018-09-12T08:58:26Z")

</div>

Had the same problem. Installing dependencies in (ansible/awx\_task:latest) image’s container worked for me. Thank you for the suggestion!

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [September 20, 2018, 6:57pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-while-update-task-in-playbook/26698/8 "2018-09-20T18:57:45Z")

</div>

Hi @Hemant Kulkarni,

I am installing python required packages but i get errors regarding installation failure. Do you have any reference docs to install the py packages in container and make the changes permanent? It would really be helpful.
