Skip to content

Commit 3083261

Browse files
committed
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.
1 parent 0e97070 commit 3083261

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

manifests/install.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
package { $package_name:
2727
ensure => installed,
2828
}
29+
File {
30+
require => Package[$package_name],
31+
}
2932
}
3033

3134
if $extra_packages {
@@ -71,7 +74,7 @@
7174
mode => '0755',
7275
}
7376

74-
exec { 'link old db schema directory for compatibility':
77+
-> exec { 'link old db schema directory for compatibility':
7578
path => $facts['path'],
7679
command => "ln -s ${data_dir}/schema ${comp_dir}/schema",
7780
unless => "stat ${comp_dir}/schema",

0 commit comments

Comments
 (0)