Skip to content

Commit

Permalink
update the db playbook to include the checker by default
Browse files Browse the repository at this point in the history
  • Loading branch information
proditis committed Apr 19, 2024
1 parent 53fac7e commit 024ce65
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion ansible/runonce/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
kern.maxfiles: 312180
rcctl:
- { name: check_quotas, state: "disable" }
- { name: cron, state: "disable" }
- { name: cron, state: "enable" }
- { name: resolved, state: "disable" }
#- { name: dhcpleased, state: "disable" }
- { name: ntpd, state: "enable" }
Expand Down Expand Up @@ -128,6 +128,12 @@
content: "{{ myname }}\n"
dest: /etc/myname

- name: Copy events checker
template:
src: "{{playbook_dir}}/../../contrib/mysql-events-checker.sh"
mode: 0555
dest: /usr/local/sbin/mysql-events-checker

- name: Create fresh /etc/hosts
copy:
content: "127.0.0.1 localhost\n{{db_ip}} {{ myname.split('.')[0] | lower }} {{ myname }}\n"
Expand Down Expand Up @@ -387,5 +393,15 @@
failed_when: result.rc not in [0,2]
register: result

- name: Install cron entries
cron:
name: "{{item.name}}"
user: "root"
minute: "{{item.minute | default(omit)}}"
special_time: "{{item.special_time|default(omit)}}"
job: "{{item.job}}"
with_items:
- { name: "events checker", minute: "*/1", job: "/usr/local/sbin/mysql-events-checker" }

- name: display post install message
debug: msg="Reboot the system for the changes to take effect"

0 comments on commit 024ce65

Please sign in to comment.