ansible-ops-management/handlers/main.yml

50 lines
982 B
YAML
Raw Normal View History

2022-02-27 03:19:20 +00:00
---
# Handlers
- name: restart_sshd
2022-03-28 05:01:23 +00:00
ansible.builtin.service:
2022-02-27 03:19:20 +00:00
name: sshd
state: restarted
- name: restart_httpd
2022-03-28 05:01:23 +00:00
ansible.builtin.service:
2022-02-27 03:19:20 +00:00
name: httpd
state: restarted
- name: restart_nginx
2022-03-28 05:01:23 +00:00
ansible.builtin.service:
2022-02-27 03:19:20 +00:00
name: nginx
state: restarted
- name: reload_networkmanager
2022-03-28 05:01:23 +00:00
ansible.builtin.service:
2022-02-27 03:19:20 +00:00
name: NetworkManager
state: reloaded
- name: regenerate_auditd_rules
command: /sbin/augenrules
- name: reload_chrony
2022-03-28 05:01:23 +00:00
ansible.builtin.systemd:
2022-02-27 03:19:20 +00:00
name: "{{ chrony_service_name }}"
state: restarted
listen: "chrony service restart"
- name: restart_gitlab
command: gitlab-ctl reconfigure
register: gitlab_restart
failed_when: gitlab_restart_handler_failed_when | bool
- name: restart_noggin
2022-03-28 05:01:23 +00:00
ansible.builtin.service:
2022-02-27 03:19:20 +00:00
name: noggin
state: restarted
- name: rehash_postfix_sasl
command: "postmap /etc/postfix/sasl_passwd"
- name: restart_postfix
2022-03-28 05:01:23 +00:00
ansible.builtin.service:
2022-02-27 03:19:20 +00:00
name: postfix
state: restarted
...