Closed zherdev-artem closed 7 years ago
The option "keep_only_specified: True" always disable other configuration.
To select manually what you want to remove, you can use these variables:
nginx_remove_sites: []
nginx_remove_configs: []
nginx_remove_snippets: []
Hi @mrZherart
Unfortunately it's not possible to user a variable for the site name. This bit won't work:-
nginx_sites:
"{{ vdomain }}":
This has been discussed a couple of times and there's no solution we know about. See https://github.com/jdauphant/ansible-role-nginx/issues/127 and https://github.com/jdauphant/ansible-role-nginx/issues/88 for example.
@philipwigg For some reason, I have everything working:
nginx_sites:
"{{ vdomain }}":
I'm using ansible-playbook new_site.yml -e "vdomain=my-super-example.com"
and see the required config name in sites-available and sites-enabled
@jdauphant Thank you!
Thank you for great role.
I learning ansible now, and I just want to have possibility add new nginx sites configs, with an option to delete other sites configs or not, how I can do it?
I'm trying this code example and now I'm always Disable unmanaged sites.
new_site.yml
vars_nginx.yaml