bundles/raspberrypi: introduce

This commit is contained in:
Franzi 2020-09-27 16:46:26 +02:00
parent 01364c2c50
commit 5d1e71e83e
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 73 additions and 6 deletions

View file

@ -0,0 +1,27 @@
default_target = node.metadata['raspberrypi']['default-target']
# On a FAT filesystem.
file_perms = {
'owner': None,
'group': None,
'mode': None,
}
actions = {
'raspberrypi_assure_target': {
'command': f'systemctl set-default {default_target}',
'unless': f'[ $(systemctl get-default) = "{default_target}" ]',
},
}
files = {
'/boot/cmdline.txt': {
'content': ' '.join(sorted(node.metadata['raspberrypi']['cmdline'])),
**file_perms,
},
'/boot/config.txt': {
'content_type': 'mako',
'context': node.metadata['raspberrypi'],
**file_perms,
},
}