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
Post a Comment