Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to run ansible in docker connect way #124

Open
dsheng opened this issue Jul 3, 2017 · 0 comments
Open

Fail to run ansible in docker connect way #124

dsheng opened this issue Jul 3, 2017 · 0 comments

Comments

@dsheng
Copy link

dsheng commented Jul 3, 2017

Using module file /usr/lib/python2.7/site-packages/ansible/modules/commands/command.py
<ansible_mysql_1> ESTABLISH DOCKER CONNECTION FOR USER: mysql
<ansible_mysql_1> EXEC ['docker', u'--tls', u'--tlscacert=/root/.sdc/docker/jill/ca.pem', u'--tlscert=/root/.sdc/docker/jill/cert.pem', u'--tlskey=/root/.sdc/docker/jill/key.pem', 'exec', '-u', u'mysql', '-i', u'ansible_mysql_1', u'/bin/sh', '-c', u'/bin/sh -c '( umask 77 && mkdir -p "echo /tmp/ansible-tmp-1498819989.43-126392766186482" && echo ansible-tmp-1498819989.43-126392766186482="echo /tmp/ansible-tmp-1498819989.43-126392766186482" ) && sleep 0'']
fatal: [localhost]: UNREACHABLE! => {
"changed": false,
"msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in "/tmp". Failed command was: ( umask 77 && mkdir -p "echo /tmp/ansible-tmp-1498819989.43-126392766186482" && echo ansible-tmp-1498819989.43-126392766186482="echo /tmp/ansible-tmp-1498819989.43-126392766186482" ), exited with result 1",
"unreachable": true
}

Maybe two issues here:

  1. It seems dockerapi cann't parse the command correctly, which is wrapped by ' .
  2. Failed to upload the command to the temporary direct in the container, when ansible PUT it.

Help to check & fix it, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant