Infra/ansible/roles/kubernetes/handlers/main.yml
2022-10-19 00:17:37 +02:00

34 lines
873 B
YAML

- name: kube | systemctl restart systemd-modules-load.service
become: "{{ do_become }}"
ansible.builtin.service:
name: "systemd-modules-load.service"
state: "restarted"
changed_when: false
failed_when: false
- name: kube | docker options changed
become: "{{ do_become }}"
ansible.builtin.service:
name: "docker.service"
state: "restarted"
changed_when: false
failed_when: false
- name: kube | sysctl --system
become: "{{ do_become }}"
ansible.builtin.command: sysctl --system
changed_when: false
failed_when: false
- name: kube | boot options changed
become: "{{ do_become }}"
changed_when: false
failed_when: false
ansible.builtin.reboot:
msg: "Reboot initiated by Ansible boot options changes"
connect_timeout: 5
reboot_timeout: 300
pre_reboot_delay: 0
post_reboot_delay: 30
test_command: uptime