Skip to content

Commit

Permalink
add reload and cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 26, 2023
1 parent 0cff53b commit 0328de9
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions roles/setup_install_nginx/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@
changed_when: "'Congratulations' in certbot_result.stdout"
no_log: True

- name: Reload nginx service
ansible.builtin.service:
name: nginx
state: reloaded

- name: Set up Certbot DNS auto-renewal cron job
ansible.builtin.cron:
name: "Certbot DNS Renewal and Reload Nginx"
job: "certbot renew --quiet && systemctl reload nginx"
special_time: daily
user: root

- name: Ensure NGINX configuration directories exist
ansible.builtin.file:
path: "/etc/nginx/{{ item }}"
Expand Down Expand Up @@ -99,7 +111,7 @@
state: link
notify: Reload nginx

- name: Include loadbalancer tasks for endpoints
ansible.builtin.import_tasks: loadbalancer.yaml
when: default_node_type == 'endpoint'
# - name: Include loadbalancer tasks for endpoints
# ansible.builtin.import_tasks: loadbalancer.yaml
# when: default_node_type == 'endpoint'
...

0 comments on commit 0328de9

Please sign in to comment.