Refactored nginx-cert-deploy-to-docker in preparation for nginx

This commit is contained in:
2025-01-21 16:00:57 +01:00
parent 936fdbad66
commit e55b37b54e
12 changed files with 77 additions and 52 deletions

View File

@@ -0,0 +1,30 @@
- name: add nginx-docker-cert-deploy.sh
copy:
src: "nginx-docker-cert-deploy.sh"
dest: "{{nginx_docker_cert_deploy_script}}"
when: run_once_nginx_docker_cert_deploy is not defined
- name: run the nginx_docker_cert_deploy tasks once
set_fact:
run_once_backup_directory_validator: true
when: run_once_nginx_docker_cert_deploy is not defined
- name: "create {{cert_mount_directory}}"
file:
path: "{{cert_mount_directory}}"
state: directory
mode: 0755
- name: configure nginx-docker-cert-deploy.cymais.service
template:
src: "nginx-docker-cert-deploy.service.j2"
dest: "/etc/systemd/system/nginx-docker-cert-deploy.{{docker_compose_project_name}}.cymais.service"
notify: restart nginx-docker-cert-deploy.cymais.service
- name: "include role for systemd-timer for {{service_name}}"
include_role:
name: systemd-timer
vars:
on_calendar: "{{on_calendar_deploy_certificates}}"
service_name: "nginx-docker-cert-deploy.{{docker_compose_project_name}}"
persistent: "true"