Ansible git clone as root -


i'm using following role ansible in order clone project in vagrant setup:

- name: clone repository    git:       repo: https://login:pwd@bitbucket.org/team/repo.git       dest: /home/vagrant/workspace/       accept_hostkey: true 

the cloning working expected, main issue directory workspace , it's content owned root:

drwxr-xr-x 7 root    root    4096 jun 10 12:35 workspace 

i thinking command executed 'vagrant' user defined in playbook:

- hosts: vagrant   sudo: yes    remote_user: vagrant   roles:     - git 

can guys me issue?

thank you.

remote_user: vagrant means ssh host user vagrant. sudo: yes means before executing each task sudo, default root. need remove sudo: yes.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -