ARTbio / GalaxyKickStart

Ansible playbooks for Galaxy Server deployment
GNU General Public License v3.0
24 stars 22 forks source link

Proxy - revisited #240

Closed colindaven closed 7 years ago

colindaven commented 7 years ago

Hi,

thanks guys for the proxy patch. I have been testing it on new commits this morning on both Ubuntu 16.04 and debian 8 jessie.

git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)

    modified:   galaxy.yml
    modified:   group_vars/proxy

Untracked files: (use "git add ..." to include in what will be committed)

    inventory_files/BioinformaticsWS

However, I have not had any success.

Theoretically it should be sufficient to add the proxy to groups_vars/proxy

I have done this, yet the proxy only works when I also add it to galaxy.yml

environment: http_proxy: http://proxy.mh-hannover.de:8080 https_proxy: http://proxy.mh-hannover.de:8080

Any ideas why the group_vars/proxy is not being read/passed on ?

drosofff commented 7 years ago

Yes, your inventory_files/BioinformaticsWS should look like:

[kickstart]
localhost ansible_connection=local
[proxy]
localhost ansible_connection=local

to pick up the proxy group_vars. Does it ?

mvdbeek commented 7 years ago

You can also add

  pre_tasks:
    - debug: var=proxy_env

on line 11 of the playbook to follow this.

To test it would be best to not rely on a combination of groups. Defining the same variable in multiple groups should be avoided, because the last group that will be loaded takes precedence, but IIRC this is not deterministic. See http://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable ("If multiple groups have the same variable, the last one loaded wins.")

If you just do:

[proxy]
localhost ansible_connection=local

replacing localhost with your actual host it should work.

colindaven commented 7 years ago

Great, the proxy works now on both machines. Thanks.

drosofff commented 7 years ago

Cool