forked from irl/ansible-collection-wip
Feat: allow defining extra nginx container vols, service prerequisites and group
This commit is contained in:
parent
051c1ab57f
commit
b25959fdb7
2 changed files with 19 additions and 1 deletions
|
@ -3,4 +3,7 @@ podman_nginx_additional_hostnames: []
|
|||
podman_nginx_certbot_testing: false
|
||||
# podman_nginx_frontend_network:
|
||||
podman_nginx_podman_rootless_user: nginx
|
||||
# podman_nginx_systemd_service_slice:
|
||||
# podman_nginx_primary_hostname:
|
||||
podman_nginx_systemd_service_requires: []
|
||||
podman_nginx_additional_volumes: []
|
||||
|
|
|
@ -7,10 +7,25 @@ PublishPort=443:443
|
|||
Volume=/home/{{ podman_nginx_podman_rootless_user }}/certbot/www:/var/www/certbot/:ro
|
||||
Volume=/home/{{ podman_nginx_podman_rootless_user }}/certbot/conf/:/etc/letsencrypt/:ro
|
||||
Volume=/home/{{ podman_nginx_podman_rootless_user }}/nginx:/etc/nginx/conf.d/:ro
|
||||
{% for item in podman_nginx_additional_volumes %}
|
||||
Volume={{ item.src }}:{{ item.dest }}:{{ item.options }}
|
||||
{% endfor %}
|
||||
|
||||
{% if podman_nginx_systemd_service_requires is defined and podman_nginx_systemd_service_requires|length > 0 %}
|
||||
[Unit]
|
||||
{% for req in podman_nginx_systemd_service_requires %}
|
||||
Requires={{ req }}.service
|
||||
After={{ req }}.service
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
[Service]
|
||||
RuntimeMaxSec=604800
|
||||
Restart=always
|
||||
{% if podman_nginx_systemd_service_slice is defined %}
|
||||
Slice={{ podman_nginx_systemd_service_slice }}
|
||||
{% else %}
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue