I use an Ansible provisioning and deployment framework called Trellis 
<https://discourse.roots.io/t/deployment-bitbucket-ssh-forwarding-problem/6652/9?u=mzoo>
 
to deploy Wordpress-based applications.

I'm cloning the master from a private Bitbucket repository using the 
following tasks:

- name: Clone project files
  git:
    repo: "{{ project_git_repo }}"
    dest: "{{ project_source_path }}"
    version: "{{ project_version }}"
    accept_hostkey: "{{ project.repo_accept_hostkey | 
default(repo_accept_hostkey | default(true)) }}"
  ignore_errors: true
  no_log: true
  register: git_clone

- name: Failed connection to remote repo
  fail:
    msg: |
      Error message here (removed for brevity)
  when: git_clone | failed

The task fails, delivering the error message, but it does clone the 
repository. I had added some debugging code 
<https://discourse.roots.io/t/deployment-bitbucket-ssh-forwarding-problem/6652/9?u=mzoo>,
 
confirming that I was in fact accessing the correct repository successfully 
(before noticing that the codebase was being cloned.)

I'm not sure why the task is (or thinks it is) failing or where to look for 
answers.

Loving Python and Ansible.

Hoping someone can help. 

-- 
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/87bef28b-e234-4294-a416-d4b010425064%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to