Skip to content

Commit

Permalink
Release 1.4.7
Browse files Browse the repository at this point in the history
Merge branch 'develop' into master
  • Loading branch information
lae committed Oct 23, 2017
2 parents d507f28 + 465d07a commit 6795835
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 6 deletions.
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@
service:
name: watchdog-mux
state: restarted

- name: restart zfs-zed
service:
name: zfs-zed
state: restarted
47 changes: 47 additions & 0 deletions tasks/kernel_module_cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
- name: Remove ZFS modprobe configuration
file:
dest: /etc/modprobe.d/zfs.conf
state: absent
when: >
(pve_zfs_options is not defined) or
(pve_zfs_options is defined and not pve_zfs_options) or
(not pve_zfs_enabled)
- name: Disable loading of ZFS module on init
file:
dest: /etc/modules-load.d/zfs.conf
state: absent
when: not pve_zfs_enabled

- block:
- name: Re-enable nmi_watchdog via GRUB config
lineinfile:
dest: /etc/default/grub
line: 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX nmi_watchdog=0"'
state: absent
register: __pve_grub

- name: Update GRUB configuration
command: update-grub
register: __pve_grub_update
failed_when: ('error' in __pve_grub_update.stderr)
when: __pve_grub|changed
tags: skiponlxc

- name: Remove ipmi_watchdog modprobe configuration
file:
dest: /etc/modprobe.d/ipmi_watchdog.conf
state: absent

- name: Load softdog
modprobe:
name: softdog

- name: Set PVE HA Manager watchdog configuration back to default
copy:
content: "WATCHDOG_MODULE=softdog"
dest: /etc/default/pve-ha-manager
notify:
- restart watchdog-mux
when: pve_watchdog != 'ipmi'
8 changes: 5 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@
backup: yes
when: "'pve-no-subscription' in pve_repository_line"

- include: zfs.yml
when: pve_zfs_enabled
- include: kernel_updates.yml

- include: ipmi_watchdog.yml
when: pve_watchdog == 'ipmi'

- include: kernel_updates.yml
- include: zfs.yml
when: pve_zfs_enabled

- include: kernel_module_cleanup.yml

- include: pve_cluster_config.yml
when: pve_cluster_enabled
Expand Down
14 changes: 11 additions & 3 deletions tasks/zfs.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
---
- name: Load zfs module
- name: Load ZFS module live
modprobe:
name: zfs
params: "{{ pve_zfs_options | default(omit) }}"
state: present
tags: skiponlxc

- name: Configure zfs module to load on boot
- name: Load ZFS module on init
copy:
content: "options zfs{% if pve_zfs_options is defined %} {{ pve_zfs_options }}{% endif %}"
content: zfs
dest: /etc/modules-load.d/zfs.conf

- name: Copy ZFS modprobe configuration
copy:
content: "options zfs {{ pve_zfs_options }}"
dest: /etc/modprobe.d/zfs.conf
when: pve_zfs_options is defined and pve_zfs_options

- name: Configure email address for ZFS event daemon notifications
lineinfile:
dest: /etc/zfs/zed.d/zed.rc
line: 'ZED_EMAIL_ADDR="{{ pve_zfs_zed_email }}"'
regexp: '^#?ZED_EMAIL_ADDR='
notify:
- restart zfs-zed
when: pve_zfs_zed_email is defined

0 comments on commit 6795835

Please sign in to comment.