From 3083261ec3b6e4420040a137828e9cdfb702d839 Mon Sep 17 00:00:00 2001 From: Sam Pearson Date: Fri, 16 Aug 2024 11:46:23 +0100 Subject: [PATCH] Install: Ensure package installed before file resources This sets a require on the package for all file resources in the install class, as sometimes Puppet tries to create these before it's installed. It also chains the DB schema copy exec to the necessary directory. --- manifests/install.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index 5352412a..465bd7f0 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -26,6 +26,9 @@ package { $package_name: ensure => installed, } + File { + require => Package[$package_name], + } } if $extra_packages { @@ -71,7 +74,7 @@ mode => '0755', } - exec { 'link old db schema directory for compatibility': + -> exec { 'link old db schema directory for compatibility': path => $facts['path'], command => "ln -s ${data_dir}/schema ${comp_dir}/schema", unless => "stat ${comp_dir}/schema",