GithubHelp home page GithubHelp logo

Comments (6)

drosofff avatar drosofff commented on June 8, 2024

https://github.com/galaxyproject/ansible-galaxy-extras/blob/master/templates/startup.sh.j2#L81

It looks like we end up with reports_auth.conf.source in /etc/nginx/conf.d/ without reports_auth.conf and this crashes nginx when the handler for restarting nginx is called

Actually, when is the startup.sh script run on the target when using the playbook ?

from ansible-galaxy-extras.

abretaud avatar abretaud commented on June 8, 2024

Oops, sorry about that!
Would it work if we created a default empty reports_auth.conf from https://github.com/galaxyproject/ansible-galaxy-extras/blob/master/tasks/nginx.yml?

from ansible-galaxy-extras.

drosofff avatar drosofff commented on June 8, 2024

Probably. But there is maybe also some adaptations to make in the nginx.conf.j2 in that case ?
Apart from that, I change https://github.com/galaxyproject/ansible-galaxy-extras/blob/master/tasks/nginx.yml#L14 with

    - { src: 'nginx_reports_auth.conf.j2',  dest: '{{ nginx_conf_directory }}/reports_auth.conf' }

And it turns around the issue since the startup.sh script is not run unless you build a docker container, does it make sense ? So yes, maybe just templating another (empty ?) reports_auth.conf.j2 in the nginx.yml task as you propose would be sufficient.

The purpose of an intermediate reports_auth.conf.source file is not clear to me since I don't see clearly the purpose. But I guess that you already fight with an issue about that !

from ansible-galaxy-extras.

abretaud avatar abretaud commented on June 8, 2024

I think just having an empty file should be enough.
I did this change because we need to make the auth part of the nginx conf file optional, and the nginx if does not do what you'd expect from a normal if.
Instead of the if, I include a file (nginx_reports_auth.conf) that is empty (no auth) or contains the basic_auth settings (if auth is enabled)

Is there an easy way to reproduce your problem?

from ansible-galaxy-extras.

drosofff avatar drosofff commented on June 8, 2024

Is there an easy way to reproduce your problem?

Pretty easy.

  • spin off a VM with ansible=2.2.1.0
  • git clone https://github.com/ARTbio/GalaxyKickStart.git
  • cd GalaxyKickStart
  • ansible-galaxy install -r requirements_roles.yml -p roles
  • ansible-playbook -i inventory/galaxykickstart galaxy.yml

And you will see nginx crashing when the handler reloads nginx

from ansible-galaxy-extras.

drosofff avatar drosofff commented on June 8, 2024

Ubuntu 14.04 !

from ansible-galaxy-extras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.