Files
cloud/press/playbooks/failover_up_secondary_proxy.yml
Balamurali M 8d13758c0d fix(ProxyServer): Add cronjob on secondary to reload every 5 mins
For "primary-primary" replication

- Also remove the job on failover
- Use a playbook for this purpose for everything else
2024-06-14 16:00:41 +05:30

26 lines
496 B
YAML

---
- name: Up secondary proxy to serve requests
hosts: all
become: yes
become_user: root
gather_facts: no
tasks:
- name: Ensure nginx is enabled and running
service:
name: nginx
enabled: yes
state: started
- name: Reload nginx
service:
name: nginx
state: reloaded
- name: Remove cron to reload nginx every 5 mins
become: yes
become_user: frappe
cron:
name: reload_nginx
state: absent