diff --git a/bundles/c3voc-addons/files/do-unattended-upgrades b/bundles/c3voc-addons/files/do-unattended-upgrades new file mode 120000 index 0000000..6709b17 --- /dev/null +++ b/bundles/c3voc-addons/files/do-unattended-upgrades @@ -0,0 +1 @@ +../../apt/files/do-unattended-upgrades \ No newline at end of file diff --git a/bundles/c3voc-addons/files/upgrade-and-reboot.conf b/bundles/c3voc-addons/files/upgrade-and-reboot.conf new file mode 120000 index 0000000..cfcc1e5 --- /dev/null +++ b/bundles/c3voc-addons/files/upgrade-and-reboot.conf @@ -0,0 +1 @@ +../../apt/files/upgrade-and-reboot.conf \ No newline at end of file diff --git a/bundles/c3voc-addons/items.py b/bundles/c3voc-addons/items.py index 944456f..c1e2822 100644 --- a/bundles/c3voc-addons/items.py +++ b/bundles/c3voc-addons/items.py @@ -63,14 +63,21 @@ files = { '/etc/kernel/postinst.d/unattended-upgrades': { 'source': 'kernel-postinst.d', }, + '/etc/upgrade-and-reboot.conf': { + 'content_type': 'mako', + }, '/usr/local/share/icinga/plugins/check_unattended_upgrades': { 'mode': '0755', }, '/usr/local/sbin/upgrade-and-reboot': { + 'mode': '0700', + }, + '/usr/local/sbin/do-unattended-upgrades': { 'content_type': 'mako', 'mode': '0700', 'context': { - 'data': node.metadata.get('apt/unattended-upgrades', {}), + 'clean_old_kernels': node.metadata.get('apt/clean_old_kernels', True), + 'restart_triggers': node.metadata.get('apt/restart_triggers', {}), } }, }