-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow multiple dependencies #66
Comments
Hi @nschloe , You can use multiple time the role in a playbook.
Sites name and config name need to have different name between several usage. |
We have two roles |
@andrenarchy can you give more details on what doesn't work ? |
I don't see how a role ( I guess we can only call a role from another role with # roles/webserver/meta/main.yml
dependencies:
- role: jdauphant.nginx
nginx_installation_type: "configuration-only"
# global nginx params
nginx_http_params:
- sendfile "on"
# ...
nginx_sites:
main_https:
# listen ... # roles/jenkins/meta/main.yml
dependencies:
- role: jdauphant.nginx
nginx_installation_type: "configuration-only"
nginx_sites:
jenkins_https:
# listen ... If |
@andrenarchy I see. You can use nginx_config variable :
(Maybe, we should deprecated nginx_http_params and use nginx_config with a default config) @nschloe @andrenarchy I have add "allow_duplicates: yes" in the last version 1.7.1 Best regards, |
So your idea is to trim Thx for adding |
nginx_sites are directly included in "server {}" block, nginx_config are not. |
@jdauphant Your proposed config works like a charm (after I realized that In order to reduce the overhead for multiple calls to the module, I overwrite the defaults in nginx_installation_type: "configuration-only"
nginx_http_params: {}
nginx_configs: {}
nginx_sites: {} Maybe this is of interest for others. Anyway, I think this issue can be closed. :) |
Ah, sorry for the mistake in the name. I have corrected that. |
@nschloe I have close the issue, if we have some problem don't hesitate to comments. |
Everything working as expected! Thanks! |
I would like to use ansible-role-nginx to add several nginx configurations from different roles to
/etc/nginx/sites-{available,enabled}/
. Unfortunately, the module doesn't support this yet. The Ansible docs sayAny thoughts on that?
The text was updated successfully, but these errors were encountered: