Merge branch 'main' into testing

This commit is contained in:
Micke Nordin 2023-08-16 12:55:35 +02:00
commit 3bd7a44d7a
2 changed files with 19 additions and 0 deletions

View file

@ -48,6 +48,13 @@ class sunetdrive::scriptreceiver()
owner => 'root',
group => 'root',
}
file { '/usr/local/bin/get_drive_customers':
ensure => file,
content => template('sunetdrive/scriptreceiver/get_drive_customers.erb.sh'),
mode => '0744',
owner => 'root',
group => 'root',
}
file { '/usr/local/bin/safer_reboot':
ensure => file,
content => template('sunetdrive/scriptreceiver/safer_reboot.erb'),

View file

@ -0,0 +1,12 @@
#!/bin/bash
mode=${1}
if [[ "${mode}" == "multi" ]]; then
filter='.multinode_mapping| keys | join("\n")'
elif [[ "${mode}" == "single" ]]; then
filter='.singlenodes| join("\n")'
else
filter='.fullnodes | join("\n")'
fi
yq -r "${filter}" < /etc/hiera/data/common.yaml