remove staging conditional on watchdog stuff, add conditionals for ensuring /dev/watchdog exists and that we are on a VM
Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
parent
71230537ca
commit
c89622c4b4
3 changed files with 10 additions and 14 deletions
|
@ -51,7 +51,7 @@ virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
|
||||||
hostname={{ inventory_hostname }} nameserver={{ dns }}
|
hostname={{ inventory_hostname }} nameserver={{ dns }}
|
||||||
ip={{ eth0_ip }}::{{ gw }}:{{ nm }}:{{ inventory_hostname }}:eth0:none'
|
ip={{ eth0_ip }}::{{ gw }}:{{ nm }}:{{ inventory_hostname }}:eth0:none'
|
||||||
--network bridge=br0,model=virtio
|
--network bridge=br0,model=virtio
|
||||||
--autostart --noautoconsole
|
--autostart --noautoconsole --watchdog default
|
||||||
|
|
||||||
# This is the wildcard certname for our proxies. It has a different name for
|
# This is the wildcard certname for our proxies. It has a different name for
|
||||||
# the staging group and is used in the proxies.yml playbook.
|
# the staging group and is used in the proxies.yml playbook.
|
||||||
|
|
|
@ -12,12 +12,3 @@ collectd_graphite: True
|
||||||
|
|
||||||
fedmsg_prefix: org.fedoraproject
|
fedmsg_prefix: org.fedoraproject
|
||||||
fedmsg_env: stg
|
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
|
|
||||||
|
|
|
@ -350,6 +350,11 @@
|
||||||
#
|
#
|
||||||
# Watchdog stuff
|
# Watchdog stuff
|
||||||
#
|
#
|
||||||
|
- name: See if there's a watchdog device
|
||||||
|
stat: path=/dev/watchdog
|
||||||
|
when: ansible_virtualization_role == 'guest'
|
||||||
|
register: watchdog_dev
|
||||||
|
|
||||||
- name: install watchdog
|
- name: install watchdog
|
||||||
yum: pkg={{ item }} state=present
|
yum: pkg={{ item }} state=present
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -358,7 +363,7 @@
|
||||||
- packages
|
- packages
|
||||||
- watchdog
|
- watchdog
|
||||||
- base
|
- base
|
||||||
when: ansible_distribution_major_version|int < 22 and env == 'staging'
|
when: ansible_distribution_major_version|int < 22 and ansible_virtualization_role == 'guest' and watchdog_dev.stat.exists
|
||||||
|
|
||||||
- name: install watchdog
|
- name: install watchdog
|
||||||
dnf: pkg={{ item }} state=present
|
dnf: pkg={{ item }} state=present
|
||||||
|
@ -368,11 +373,11 @@
|
||||||
- packages
|
- packages
|
||||||
- watchdog
|
- watchdog
|
||||||
- base
|
- base
|
||||||
when: ansible_distribution_major_version|int > 21 and env == 'staging'
|
when: ansible_distribution_major_version|int > 21 and ansible_virtualization_role == 'guest' and watchdog_dev.stat.exists
|
||||||
|
|
||||||
- name: watchdog device configuration
|
- name: watchdog device configuration
|
||||||
copy: src=watchdog.conf dest=/etc/watchdog.conf owner=root group=root mode=644
|
copy: src=watchdog.conf dest=/etc/watchdog.conf owner=root group=root mode=644
|
||||||
when: env == 'staging'
|
when: ansible_virtualization_role == 'guest' and watchdog_dev.stat.exists
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- watchdog
|
- watchdog
|
||||||
|
@ -381,7 +386,7 @@
|
||||||
|
|
||||||
- name: Set watchdog to run on boot
|
- name: Set watchdog to run on boot
|
||||||
service: name=watchdog enabled=yes
|
service: name=watchdog enabled=yes
|
||||||
when: env == 'staging'
|
when: ansible_virtualization_role == 'guest' and watchdog_dev.stat.exists
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
notify:
|
notify:
|
||||||
- restart watchdog
|
- restart watchdog
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue