Here is my task:
- name: Install Private Git Repos
git:
repo: “{{ item.repo }}”
dest: “/home/don/Developer/{{ item.dest }}”
with_items: - repo: git@github.com:DonBower/ansible.git
dest: ansible
I can do this manually from the target hosts command line, but running ansible-playbook results in:
failed: [ideapad-ubuntu.ag6hq.net] (item={‘repo’: ‘git@github.com:DonBower/ansible.git’, ‘dest’: ‘ansible’}) => {
“ansible_loop_var”: “item”,
“changed”: false,
“cmd”: [
“/usr/bin/git”,
“fetch”,
“–tags”,
“origin”
],
“invocation”: {
“module_args”: {
“accept_hostkey”: false,
“accept_newhostkey”: false,
“archive”: null,
“archive_prefix”: null,
“bare”: false,
“clone”: true,
“depth”: null,
“dest”: “/home/don/Developer/ansible”,
“executable”: null,
“force”: false,
“gpg_whitelist”: ,
“key_file”: null,
“recursive”: true,
“reference”: null,
“refspec”: null,
“remote”: “origin”,
“repo”: “git@github.com:DonBower/ansible.git”,
“separate_git_dir”: null,
“single_branch”: false,
“ssh_opts”: null,
“track_submodules”: false,
“umask”: null,
“update”: true,
“verify_commit”: false,
“version”: “HEAD”
}
},
“item”: {
“dest”: “ansible”,
“repo”: “git@github.com:DonBower/ansible.git”
},
“msg”: “Failed to download remote objects and refs: Host key verification failed.\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n”
}
What am I doing wrong?