I am trying to clone from git private repo. I have done all the other steps 
but when it reaches to pull sources from git, I suddenly got error that 
/var/www/ directory is not empty. I donot know how to tackle this issue. 
Here is the chunk of code where I am facing error:

- name: Pull sources from GitHub
  git:
    repo: "{{ item.github_repo }}"
    version: "{{ item.github_branch }}"
    dest: "{{ WEB_ROOT }}/{{ item.server_name }}"
    key_file: "/home/brokergenius/.ssh/id_rsa"
    force: yes
    recursive: no
  when: item.get('state', 'link') == 'link'
  with_items: VIRTUAL_HOSTS

And error is: 

TASK: [github | Pull sources from GitHub] 
*************************************
failed: [158.69.201.193] => (item={'state': 'link', 'http_port': 80, 
'github_branch': 'master', 'server_name': '158.69.201.193', 'github_repo': 
'[email protected]:davidandorf/pricecalculation_pos.git'}) => {"cmd": 
"/usr/bin/git clone --origin origin --branch master '' 
/var/www/158.69.201.193", "failed": true, "item": {"github_branch": 
"master", "github_repo": 
"[email protected]:davidandorf/pricecalculation_pos.git", "http_port": 80, 
"server_name": "158.69.201.193", "state": "link"}, "rc": 128}
stderr: fatal: destination path '/var/www/158.69.201.193' already exists 
and is not an empty directory.

msg: fatal: destination path '/var/www/158.69.201.193' already exists and 
is not an empty directory.

I have tried to empty that file manually and then i tried to run it again 
but i got the same error again. 
Is there any solution to help me out guys?? 

-- 
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/3753448a-536a-45d3-82b6-8d5d2c05214a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to