zfs node work in prep for open-ebs zfs
This commit is contained in:
8
ansible/roles/zfs_repo_install/templates/key-params.j2
Normal file
8
ansible/roles/zfs_repo_install/templates/key-params.j2
Normal file
@ -0,0 +1,8 @@
|
||||
Key-Type: 1
|
||||
Key-Length: 3072
|
||||
Subkey-Type: 1
|
||||
Subkey-Length: 3072
|
||||
Name-Real: Local Administrator
|
||||
Name-Email: root@{{ ansible_host }}
|
||||
Expire-Date: 0
|
||||
%no-protection
|
1
ansible/roles/zfs_repo_install/templates/smartd.conf.j2
Normal file
1
ansible/roles/zfs_repo_install/templates/smartd.conf.j2
Normal file
@ -0,0 +1 @@
|
||||
DEVICESCAN -a -o on -S on -s (S/../.././03|L/../01/./04) -W 4,45,60 -m notificationrecipient@emailprovider.com -M exec /usr/local/bin/smartdnotify.sh
|
27
ansible/roles/zfs_repo_install/templates/smartdnotify.sh.j2
Normal file
27
ansible/roles/zfs_repo_install/templates/smartdnotify.sh.j2
Normal file
@ -0,0 +1,27 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Create a file to store the message in. Give it a unique filename to avoid issues if this script runs twice simultaneously
|
||||
msgFile="/root/$(uuidgen).txt"
|
||||
|
||||
# Clear file, set subject line and formatting
|
||||
echo "Subject: $SMARTD_SUBJECT" > $msgFile
|
||||
echo "Content-Type: text/html" >> $msgFile
|
||||
echo "<html>" >> $msgFile
|
||||
echo "<style type=\"text/css\">pre { font-family:monospace }</style>" >> $msgFile
|
||||
echo "<body>" >> $msgFile
|
||||
echo "<pre>" >> $msgFile
|
||||
|
||||
# Save the email message from STDIN:
|
||||
cat >> $msgFile
|
||||
|
||||
# Append the output of zpool status:
|
||||
/usr/sbin/zpool status >> $msgFile
|
||||
|
||||
# Append the output of smartctl -a to the message:
|
||||
/usr/sbin/smartctl -a "$SMARTD_DEVICE" >> $msgFile
|
||||
|
||||
# Close HTML tags
|
||||
echo "</pre></body></html>" >> $msgFile
|
||||
|
||||
# Now email the message to the user at address ADD:
|
||||
/bin/msmtp "$SMARTD_ADDRESS" < $msgFile
|
2
ansible/roles/zfs_repo_install/templates/zfs.conf.j2
Normal file
2
ansible/roles/zfs_repo_install/templates/zfs.conf.j2
Normal file
@ -0,0 +1,2 @@
|
||||
options zfs zfs_arc_min={{ zfs_arc_min }}
|
||||
options zfs zfs_arc_max={{ zfs_arc_max }}
|
Reference in New Issue
Block a user