[ 'unattended_origins_patterns' => [ 'o=${distro_id},a=${distro_codename}', 'o=${distro_id},a=${distro_codename}-security', ], 'unattended_mail' => $config['mail'], 'unattended_automatic_reboot' => true, 'unattended_syslog_enable' => true, ]], $config ); return [ # setup unattended upgrades ...(new UnattendedUpgrades())($config['unattended_upgrades']), # setup user (new Task())->setModule(new AptModule([ 'package' => 'zsh', ])), (new Task())->setModule(new UserModule([ 'username' => $config['username'], 'password' => $config['password'], 'groups' => ['sudo'], 'append' => true, 'shell' => '/bin/zsh', ])), (new Task())->setModule(new CopyModule([ 'src' => '~/.ssh', 'dest' => '/home/' . $config['username'] . '/.ssh', 'owner' => $config['username'], 'group' => $config['username'], 'remoteSrc' => true, ])), (new Task())->setModule(new GitModule([ 'repo' => 'https://github.com/ohmyzsh/ohmyzsh.git', 'dest' => "/home/$config[username]/.oh-my-zsh", 'owner' => $config['username'], 'group' => $config['username'], ])), (new Task())->setModule(new CopyModule([ 'src' => "/home/$config[username]/.oh-my-zsh/templates/zshrc.zsh-template", 'dest' => "/home/$config[username]/.zshrc", 'owner' => $config['username'], 'group' => $config['username'], 'remoteSrc' => true, ])), # setup firewall (new Task())->setModule(new UfwModule([ 'rule' => 'allow', 'name' => 'OpenSSH', 'state' => State::ENABLED, ])), ]; } }