Attempting to repetitively git clone deploy into a common directory, but getting errors "/www' already exists and is not an empty directory".
error: fatal: [35.162.216.10]: FAILED! => {"changed": false, "cmd": "/usr/bin/git clone --origin origin https://github.com/installtest/PHP-Algos.git /www", "failed": true, "msg": "fatal: destination path '/www' already exists and is not an empty directory.", "rc": 128, "stderr": "fatal: destination path '/www' already exists and is not an empty directory.\n", "stdout": "", "stdout_lines": []}
sections from playbook:
vars:
- website_dir: /www
- name: Deploy Code From Github
git:
dest={{ website_dir }}/
repo=https://github.com/installtest/PHP-Algos.git
update=yes
force=yes
perms for the deploy directory. The deploy is currently as ubuntu.
root@ip-172-30-0-219:~# ls -al /www
total 12
drwxrwxr-x 2 ubuntu www-data 4096 Nov 14 04:43 .
drwxr-xr-x 24 root root 4096 Nov 14 04:33 ..
-rw-r--r-- 1 ubuntu www-data 27 Nov 14 04:43 DATA_VARIABLES
DATA_VARIABLES
in there. – Xiong Chiamiov