watchdog-ify staging, hopefully
Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
parent
25e3829da9
commit
edc4b7067d
8 changed files with 55 additions and 39 deletions
3
roles/base/files/watchdog.conf
Normal file
3
roles/base/files/watchdog.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
watchdog-device = /dev/watchdog
|
||||
realtime = yes
|
||||
priority = 1
|
3
roles/base/handlers/main.yml
Normal file
3
roles/base/handlers/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: restart watchdog
|
||||
service: name=watchdog state=restarted
|
|
@ -346,3 +346,46 @@
|
|||
tags:
|
||||
- config
|
||||
- base
|
||||
|
||||
#
|
||||
# Watchdog stuff
|
||||
#
|
||||
- name: install watchdog
|
||||
yum: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- watchdog
|
||||
tags:
|
||||
- packages
|
||||
- watchdog
|
||||
- base
|
||||
when: ansible_distribution_major_version|int < 22 && env == 'staging'
|
||||
|
||||
- name: install watchdog
|
||||
dnf: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- watchdog
|
||||
tags:
|
||||
- packages
|
||||
- watchdog
|
||||
- base
|
||||
when: ansible_distribution_major_version|int > 21 && env == 'staging'
|
||||
|
||||
- name: watchdog device configuration
|
||||
copy: src=watchdog.conf dest=/etc/watchdog.conf owner=root group=root mode=644
|
||||
when: env == 'staging'
|
||||
tags:
|
||||
- config
|
||||
- watchdog
|
||||
- base
|
||||
notify: restart watchdog
|
||||
|
||||
- name: Set watchdog to run on boot
|
||||
service: name=watchdog enabled=yes
|
||||
when: env == 'staging'
|
||||
ignore_errors: true
|
||||
notify:
|
||||
- restart watchdog
|
||||
tags:
|
||||
- service
|
||||
- watchdog
|
||||
- base
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue