debops-tools
debops-tools copied to clipboard
make misc/scripts/bootstrap_ansible more proxy friendly
Currrently, it uses
project="git://github.com/ansible/ansible.git"
which is not friendly for people behind a proxy, because setting up git to use the git protocol via a proxy is much more painful than setting it up to use HTTP through a proxy.
The HTTP URL seems to work well, so I suggest to use that instead.
Will it work with https:// URL as well?
yes :) When https_proxy is set.
Great, I'll switch it then when I get a chance, or you could post a PR. Also, come over to #debops @ FreeNode if you want, some issues could be solved better in real time. :)
It seems that #109 is already fixing some of the proxy issues mentioned here, however, I have another special case where the debops-update script is not working well with git:// URIs.
In my case, outgoing traffic is only open to port 443. Requests to port 9418 are silently dropped. This leads to the following interesting side effect:
-
when running
debops-updateon a fresh installation, fetching the first roleansible-role-ansiblesucceeds, as the role name lookup heuristic which first tries to lookup the wrong role nameansible-ansibleis falling back to the correct name after the timeout (return code 128) of thegit ls-remotetowards the blockedgit://URI (I added some debug statements to show the variable assignment):DEBUG: remote_uri = git://github.com/debops/ansible-ansible DEBUG: repo_status = 128 DEBUG: remote_uri = https://github.com/debops/ansible-role-ansible Installing https://github.com/debops/ansible-role-ansible [master] (1/73) -
for the subsequent roles which have a different naming scheme, the algorithm fails, as the second name which is requested is obviously wrong:
DEBUG: remote_uri = git://github.com/debops/ansible-apt DEBUG: repo_status = 128 DEBUG: remote_uri = https://github.com/debops/ansible-role-apt Installing https://github.com/debops/ansible-role-apt [master] (2/73) Username for 'https://github.com': -
if I change the script to completely get rid of the
git://URI prefix, the first role will hang with an invalid URL. -
the nasty thing is, that the HTTP and the git protocol don't behave the same when given an invalid URL and that the script behaviour is guessing the correct role name based on that. This makes it impossible at the moment to run the update over HTTPS only.
However, I think it should be possible to rename the ansible-role-ansible and at the same time get rid of the git:// prefix without breaking anything... What do you think?