From 220496056eb730f204f9d21d61d10d41d876c5a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 14 Jul 2018 10:49:21 +0200 Subject: [PATCH] Fix package dependencies for base installation --- modules/base_installation/manifests/cronie.pp | 4 ++++ modules/base_installation/manifests/grub.pp | 7 ++++--- modules/base_installation/manifests/services.pp | 15 +++++++++------ modules/base_installation/manifests/ssh.pp | 5 +++-- modules/base_installation/manifests/users.pp | 3 ++- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/modules/base_installation/manifests/cronie.pp b/modules/base_installation/manifests/cronie.pp index 3558d9f..ca3eb2a 100644 --- a/modules/base_installation/manifests/cronie.pp +++ b/modules/base_installation/manifests/cronie.pp @@ -1,6 +1,10 @@ class base_installation::cronie inherits base_installation { ensure_packages(['cronie']) + Package["cronie"] -> Cron::Job <| |> + Package["cronie"] -> Cron::Job::Multiple <| |> + Package["cronie"] -> Cron::Daily <| |> + unless empty($base_installation::puppet_code_path) { file { 'post-hook': ensure => file, diff --git a/modules/base_installation/manifests/grub.pp b/modules/base_installation/manifests/grub.pp index 0a96aa7..208b745 100644 --- a/modules/base_installation/manifests/grub.pp +++ b/modules/base_installation/manifests/grub.pp @@ -9,9 +9,10 @@ class base_installation::grub inherits base_installation { # } file_line { "/etc/default/grub#GRUB_CMDLINE_LINUX": - path => "/etc/default/grub", - line => 'GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS0,115200"', - match => '^GRUB_CMDLINE_LINUX=' + path => "/etc/default/grub", + line => 'GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS0,115200"', + match => '^GRUB_CMDLINE_LINUX=', + require => Package["grub"], } # exec { 'update GRUB config': diff --git a/modules/base_installation/manifests/services.pp b/modules/base_installation/manifests/services.pp index 1659f97..f24b55f 100644 --- a/modules/base_installation/manifests/services.pp +++ b/modules/base_installation/manifests/services.pp @@ -7,13 +7,15 @@ class base_installation::services inherits base_installation { } service { "sshd": - ensure => $ensure, - enable => true, + ensure => $ensure, + enable => true, + require => Package["openssh"], } service { "atd": - ensure => $ensure, - enable => true + ensure => $ensure, + enable => true, + require => Package["at"], } service { "systemd-networkd": @@ -32,8 +34,9 @@ class base_installation::services inherits base_installation { } service { "cronie": - ensure => $ensure, - enable => true, + ensure => $ensure, + enable => true, + require => Package["cronie"], } file { '/etc/systemd/system/getty@tty1.service.d/': diff --git a/modules/base_installation/manifests/ssh.pp b/modules/base_installation/manifests/ssh.pp index 43769e9..d6317d5 100644 --- a/modules/base_installation/manifests/ssh.pp +++ b/modules/base_installation/manifests/ssh.pp @@ -1,13 +1,14 @@ class base_installation::ssh inherits base_installation { class { 'ssh::server': storeconfigs_enabled => false, - options => { + options => { 'AcceptEnv' => undef, 'X11Forwarding' => 'yes', 'PrintMotd' => 'no', 'ChallengeResponseAuthentication' => 'no', 'Subsystem' => 'sftp /usr/lib/openssh/sftp-server', - } + }, + require => Package["openssh"] } contain "ssh::server" diff --git a/modules/base_installation/manifests/users.pp b/modules/base_installation/manifests/users.pp index d0ac449..1ce5da7 100644 --- a/modules/base_installation/manifests/users.pp +++ b/modules/base_installation/manifests/users.pp @@ -15,7 +15,8 @@ class base_installation::users ( sudo::conf { 'wheel': priority => 10, - content => "%wheel ALL=(ALL) ALL" + content => "%wheel ALL=(ALL) ALL", + require => Package["sudo"], } contain "sudo" -- 2.41.0