1
我使用的是为了我的流浪者设置克隆项目Ansible以下作用:Ansible混帐克隆作为根
- name: Clone Repository
git:
repo: https://login:[email protected]/team/repo.git
dest: /home/vagrant/workspace/
accept_hostkey: true
克隆工作正常,但主要的问题是,目录工作区和它所有的内容现在的所有者是root:
drwxr-xr-x 7 root root 4096 Jun 10 12:35 workspace
我在想,这些命令是由“流浪者”的用户,正如我在剧本规定执行:
- hosts: vagrant
sudo: yes
remote_user: vagrant
roles:
- git
你们可以帮我解决这个问题吗?
谢谢。