Move zfs-scrub template to git-crypt file
This commit is contained in:
parent
76c4ae6531
commit
999b601432
3 changed files with 5 additions and 4 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1,2 +1,3 @@
|
|||
files/sasl_passwd filter=git-crypt diff=git-crypt
|
||||
files/borgmatic.yaml filter=git-crypt diff=git-crypt
|
||||
files/zfs-scrub.sh filter=git-crypt diff=git-crypt
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# https://serverfault.com/questions/538978/how-to-run-a-command-once-a-zfs-scrub-completes
|
||||
set -euo pipefail
|
||||
|
||||
curl -m 10 --retry 5 {{ host.data.zfs_healthchecks }}/start
|
||||
curl -m 10 --retry 5 <healthchecks_url>/start
|
||||
zpool scrub local
|
||||
# wait until scrub is finished
|
||||
while zpool status local | grep -q 'scan: *scrub in progress'; do
|
||||
|
@ -14,5 +14,5 @@ zpool status local
|
|||
|
||||
# Get stdout from journalctl
|
||||
LOG=$(journalctl -o cat -u zfs-scrub.service -n 100)
|
||||
curl -fsS -m 10 --retry 5 --data-raw "$LOG" {{ host.data.zfs_healthchecks }}
|
||||
curl -fsS -m 10 --retry 5 --data-raw "$LOG" <healthchecks_url>
|
||||
exit 0
|
|
@ -40,9 +40,9 @@ if not host.fact.command('lxc storage volume list default | grep images || true'
|
|||
commands=['lxc storage volume create default images', 'lxc config set storage.images_volume default/images']
|
||||
)
|
||||
|
||||
files.template(
|
||||
files.put(
|
||||
name='Push zfs-scrub script',
|
||||
src='templates/zfs-scrub.sh.j2',
|
||||
src='files/zfs-scrub.sh',
|
||||
dest='/usr/local/bin/zfs-scrub.sh',
|
||||
mode='700',
|
||||
user='root',
|
||||
|
|
Reference in a new issue