In our environment we do not allow execution from /tmp.

So:

Julians-Macbook-Pro:deploy_with_ansible julianbrown$ cat ansible.cfg
[defaults]
inventory = myhosts.ini
remote_tmp = ~/.ansible/tmp
local_tmp = ~/.ansible/tmp

[ssh_connection]
ssh_args=-o ForwardAgent=yes

I tell it to use ~/.ansible/tmp

Playbook:

Julians-Macbook-Pro:deploy_with_ansible julianbrown$ cat 
deploy_julian_bin.yml
---
- hosts: all
  remote_user: root

  tasks:
    - name: deploy bin git repo
      git:
        repo: XXXXXX for privacy
        dest: /root/bin
        version: master


But it is being ignored:

508 fatal: [testing.tld]: FAILED! => {
509     "changed": false,
510     "cmd": "/usr/local/cpanel/3rdparty/lib/path-bin/git clone --origin 
origin 
'ssh:********@enterprise.cpanel.net:7999/~julian.brown/ansible-julian-mybin.
511     "failed": true,
512     "invocation": {
513         "module_args": {
514             "accept_hostkey": false,
515             "archive": null,
516             "bare": false,
517             "clone": true,
518             "depth": null,
519             "dest": "/root/bin",
520             "executable": null,
521             "force": false,
522             "key_file": null,
523             "recursive": true,
524             "reference": null,
525             "refspec": null,
526             "remote": "origin",
527             "repo": 
"ssh://[email protected]:7999/~julian.brown/ansible-julian-mybin.git",
528             "ssh_opts": null,
529             "track_submodules": false,
530             "umask": null,
531             "update": true,
532             "verify_commit": false,
533             "version": "master"
534         }
535     },
536     "msg": "Cloning into '/root/bin'...\nfatal: cannot exec 
'/tmp/tmpupKV8D': Permission denied\nfatal: unable to fork",
537     "rc": 128,
538     "stderr": "Cloning into '/root/bin'...\nfatal: cannot exec 
'/tmp/tmpupKV8D': Permission denied\nfatal: unable to fork\n",
539     "stderr_lines": [
540         "Cloning into '/root/bin'...",
541         "fatal: cannot exec '/tmp/tmpupKV8D': Permission denied",
542         "fatal: unable to fork"
543     ],
544     "stdout": "",
545     "stdout_lines": []

It is still trying to execute a script in /tmp, how do I tell it to NOT put 
it's scripts in /tmp?

None of the parameters listed in the configuration page seem to do that, of 
course I could be reading it wrong.

Thanx

Julian


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/92918a55-011f-40e6-8cbd-fadad79fa78e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to