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

2,655 views
Skip to first unread message

Hemant Kulkarni

unread,
Feb 9, 2018, 11:52:24 AM2/9/18
to AWX Project
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

John Mitchell

unread,
Feb 9, 2018, 12:38:39 PM2/9/18
to Hemant Kulkarni, AWX Project
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

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/2ac7a494-a031-442d-be9f-78aeef33717b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

John Mitchell
UI Engineer - Ansible Tower
Ansible by Red Hat

919-394-6667 | ansible.com 

GitHub: jlmitch5

Hemant Kulkarni

unread,
Feb 9, 2018, 1:20:03 PM2/9/18
to AWX Project
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   
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

John Mitchell

unread,
Feb 9, 2018, 1:29:24 PM2/9/18
to Hemant Kulkarni, AWX Project
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.

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hemant Kulkarni

unread,
Feb 9, 2018, 3:26:08 PM2/9/18
to AWX Project
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 
 

On Friday, February 9, 2018 at 10:22:24 PM UTC+5:30, Hemant Kulkarni wrote:

John Mitchell

unread,
Feb 9, 2018, 3:30:04 PM2/9/18
to Hemant Kulkarni, AWX Project
Glad you were able to figure it out!

John

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

sharada Nagarkar

unread,
Sep 12, 2018, 4:58:26 AM9/12/18
to AWX Project
Had the same problem. Installing dependencies in  (ansible/awx_task:latest) image's container worked for me. Thank you for the suggestion!

Ankit Vashistha

unread,
Sep 20, 2018, 2:57:45 PM9/20/18
to AWX Project
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.
Reply all
Reply to author
Forward
0 new messages