ansible-pull, GitHub private repository, deploy key

572 views
Skip to first unread message

Florin Andrei

unread,
Jan 27, 2015, 8:24:28 PM1/27/15
to ansible...@googlegroups.com
I might be asking something obvious here, but anyway:

I've a private repo on GitHub, with an account on a read-only team there. I would like to run ansible-pull in one step with that repo, but I can't seem to figure out how to tell ansible-pull to use the correct deploy key on GH. The git module in main ansible has options such as key_file (and accept_hostkey). There don't seem to be analogues for ansible-pull.

A workaround would be to pull that repo some other way to localhost, then run ansible-playbook -c local. I don't particularly like that - for a variety of reasons (not all of a technical nature) I'm looking for a minimalist solution: install ansible, drop one key file on the host, and append one short line to cron.

Giovanni Tirloni

unread,
Jan 28, 2015, 7:35:51 AM1/28/15
to ansible...@googlegroups.com
On Tue, 27 Jan 2015 17:24 -0800, Florin Andrei <florin...@gmail.com>
wrote:
> I might be asking something obvious here, but anyway:
>
> I've a private repo on GitHub, with an account on a read-only team there. I would like to run ansible-pull in one step with that repo, but I can't seem to figure out how to tell ansible-pull to use the correct deploy key on GH. The git module in main ansible has options such as key_file (and accept_hostkey). There don't seem to be analogues for ansible-pull.
>
> A workaround would be to pull that repo some other way to localhost, then run ansible-playbook -c local. I don't particularly like that - for a variety of reasons (not all of a technical nature) I'm looking for a minimalist solution: install ansible, drop one key file on the host, and append one short line to cron.

If I understand how ansible-pull works, it will do the git checkout and
then call ansible-playbook.

You can try to specify private_key_file in ansible.cfg and see if
ansible-playbook picks it up.

Giovanni

pjgo...@gmail.com

unread,
Aug 31, 2022, 5:09:28 AM8/31/22
to Ansible Project
This subject seems to provoke speculation, but no working examples.
Reply all
Reply to author
Forward
0 new messages