diff --git a/ansible/runonce/db.yml b/ansible/runonce/db.yml index 5c2602bb2..6c6fed3ff 100644 --- a/ansible/runonce/db.yml +++ b/ansible/runonce/db.yml @@ -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" } @@ -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" @@ -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"