watchdog-ify staging, hopefully

Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
Rick Elrod 2015-11-10 20:11:11 +00:00
parent 25e3829da9
commit edc4b7067d
8 changed files with 55 additions and 39 deletions

View file

@ -12,3 +12,12 @@ collectd_graphite: True
fedmsg_prefix: org.fedoraproject
fedmsg_env: stg
virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
--vcpus={{ num_cpus }} -l {{ ks_repo }} -x
'ksdevice=eth0 ks={{ ks_url }} console=tty0 console=ttyS0
hostname={{ inventory_hostname }} nameserver={{ dns }}
ip={{ eth0_ip }}::{{ gw }}:{{ nm }}:{{ inventory_hostname }}:eth0:none'
--network bridge=br0,model=virtio
--autostart --noautoconsole --watchdog default

View file

@ -10,12 +10,3 @@ volgroup: /dev/vg_guests
eth0_ip: 10.5.126.66
vmhost: virthost11.phx2.fedoraproject.org
datacenter: phx2
virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
--vcpus={{ num_cpus }} -l {{ ks_repo }} -x
'ksdevice=eth0 ks={{ ks_url }} console=tty0 console=ttyS0
hostname={{ inventory_hostname }} nameserver={{ dns }}
ip={{ eth0_ip }}::{{ gw }}:{{ nm }}:{{ inventory_hostname }}:eth0:none'
--network bridge=br0,model=virtio
--autostart --noautoconsole --watchdog default

View file

@ -12,7 +12,6 @@
roles:
- base
- { role: watchdog, when: env == "staging" }
- rkhunter
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client

View file

@ -0,0 +1,3 @@
watchdog-device = /dev/watchdog
realtime = yes
priority = 1

View file

@ -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

View file

@ -1 +0,0 @@
watchdog-device=/dev/watchdog

View file

@ -1,28 +0,0 @@
---
#
# Setup watchdog
#
- name: install needed packages
yum: pkg={{ item }} state=present
with_items:
- watchdog
tags:
- packages
- watchdog
when: ansible_distribution_major_version|int < 22
- name: install needed packages
dnf: pkg={{ item }} state=present
with_items:
- watchdog
tags:
- packages
- watchdog
when: ansible_distribution_major_version|int > 21
- name: watchdog device configuration
copy: src=watchdog-device dest=/etc/watchdog.d/watchdog-device owner=root group=root mode=644
tags:
- config
- watchdog
notify: restart watchdog