From 50c2fbafe6bf15909b893ddf0c862af3f7e848cb Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 28 Apr 2021 14:49:16 +0200 Subject: Initial commit --- src/UnattendedUpgrades.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/UnattendedUpgrades.php (limited to 'src/UnattendedUpgrades.php') diff --git a/src/UnattendedUpgrades.php b/src/UnattendedUpgrades.php new file mode 100644 index 0000000..2322cef --- /dev/null +++ b/src/UnattendedUpgrades.php @@ -0,0 +1,44 @@ +setModule(new AptModule([ + 'package' => 'unattended-upgrades', + 'updateCache' => true, + ])), + (new Task())->setModule(new TemplateModule([ + 'src' => dirname(__DIR__) . '/files/auto-upgrades.twig', + 'dest' => '/etc/apt/apt.conf.d/20auto-upgrades', + 'vars' => $config, + 'owner' => 'root', + 'group' => 'root', + 'mode' => 0644, + 'force' => true, + ])), + (new Task())->setModule(new TemplateModule([ + 'src' => dirname(__DIR__) . '/files/unattended-upgrades.twig', + 'dest' => '/etc/apt/apt.conf.d/50unattended-upgrades', + 'vars' => $config, + 'owner' => 'root', + 'group' => 'root', + 'mode' => 0644, + 'force' => true, + ])), + ]; + } +} -- cgit v1.2.3