Compare commits
7 commits
bbe3d9c7f5
...
d9b84aaf7e
Author | SHA1 | Date | |
---|---|---|---|
d9b84aaf7e | |||
61da5978dc | |||
6b21f2e8fd | |||
314c968006 | |||
0eb37a909e | |||
2211571689 | |||
6cb4275e31 |
4 changed files with 12 additions and 8 deletions
|
@ -10,7 +10,6 @@ nodes = [
|
|||
for node in sorted(repo.nodes_in_group('debian'))
|
||||
if not node.dummy
|
||||
]
|
||||
reboot_nodes = []
|
||||
|
||||
print('updating nodes:', sorted(node.name for node in nodes))
|
||||
|
||||
|
@ -25,13 +24,12 @@ for node in nodes:
|
|||
print(node.run('DEBIAN_FRONTEND=noninteractive apt list --upgradable').stdout.decode())
|
||||
if int(node.run('DEBIAN_FRONTEND=noninteractive apt list --upgradable 2> /dev/null | grep upgradable | wc -l').stdout.decode()):
|
||||
print(node.run('DEBIAN_FRONTEND=noninteractive apt -y dist-upgrade').stdout.decode())
|
||||
reboot_nodes.append(node)
|
||||
|
||||
# REBOOT IN ORDER
|
||||
|
||||
wireguard_servers = [
|
||||
node
|
||||
for node in reboot_nodes
|
||||
for node in nodes
|
||||
if node.has_bundle('wireguard')
|
||||
and (
|
||||
ip_interface(node.metadata.get('wireguard/my_ip')).network.prefixlen <
|
||||
|
@ -41,7 +39,7 @@ wireguard_servers = [
|
|||
|
||||
wireguard_s2s = [
|
||||
node
|
||||
for node in reboot_nodes
|
||||
for node in nodes
|
||||
if node.has_bundle('wireguard')
|
||||
and (
|
||||
ip_interface(node.metadata.get('wireguard/my_ip')).network.prefixlen ==
|
||||
|
@ -51,7 +49,7 @@ wireguard_s2s = [
|
|||
|
||||
everything_else = [
|
||||
node
|
||||
for node in reboot_nodes
|
||||
for node in nodes
|
||||
if not node.has_bundle('wireguard')
|
||||
]
|
||||
|
||||
|
@ -62,8 +60,9 @@ for node in [
|
|||
*wireguard_s2s,
|
||||
*wireguard_servers,
|
||||
]:
|
||||
print('rebooting', node.name)
|
||||
try:
|
||||
print(node.run('systemctl reboot').stdout.decode())
|
||||
if node.run('test -e /var/run/reboot-required').return_code == 0:
|
||||
print('rebooting', node.name)
|
||||
print(node.run('systemctl reboot').stdout.decode())
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
|
|
@ -25,7 +25,8 @@ def backup_freshness_check(metadata):
|
|||
'datasets': {
|
||||
f"{other_node.metadata.get('id')}/{dataset}"
|
||||
for other_node in repo.nodes
|
||||
if other_node.has_bundle('backup')
|
||||
if not other_node.dummy
|
||||
and other_node.has_bundle('backup')
|
||||
and other_node.has_bundle('zfs')
|
||||
and other_node.metadata.get('backup/server') == metadata.get('backup-freshness-check/server')
|
||||
for dataset, options in other_node.metadata.get('zfs/datasets').items()
|
||||
|
|
|
@ -35,6 +35,7 @@ def zfs(metadata):
|
|||
|
||||
for other_node in repo.nodes:
|
||||
if (
|
||||
not other_node.dummy and
|
||||
other_node.has_bundle('backup') and
|
||||
other_node.metadata.get('backup/server') == node.name
|
||||
):
|
||||
|
|
|
@ -10,6 +10,7 @@ password required pam_deny.so
|
|||
session required pam_permit.so
|
||||
EOT
|
||||
|
||||
sudo xcodebuild -license accept
|
||||
xcode-select --install
|
||||
|
||||
git -C ~/.zsh/oh-my-zsh pull
|
||||
|
@ -41,3 +42,5 @@ fi
|
|||
sudo systemsetup -setremotelogin on # enable ssh
|
||||
|
||||
pip install --upgrade pip
|
||||
|
||||
# https://sysadmin-journal.com/apache-directory-studio-on-the-apple-m1/
|
||||
|
|
Loading…
Reference in a new issue