Rely on autorequire for config resource ordering

Currently we specify the ordering of config resources wherever it is
necessary based on the presence of the file it will write to, or the
presence of the package in charge of providing the file it will write
to.

Those kind of ordering can be specified directly at the resource level
using the autorequire mechanism. With this patch, any config resource
will make sure the package in charge of providing the file will be
installed first.

Change-Id: If90d097129bad922511465345d577df37d84e78b
This commit is contained in:
Yanis Guenane 2015-08-12 11:13:01 +02:00
parent dd80631f4b
commit f43996fda5
2 changed files with 5 additions and 1 deletions

View File

@ -39,4 +39,9 @@ Puppet::Type.newtype(:tuskar_config) do
defaultto false
end
autorequire(:package) do
'tuskar-api'
end
end

View File

@ -111,7 +111,6 @@ class tuskar::api(
Tuskar_config<||> ~> Exec['post-tuskar_config']
Tuskar_config<||> ~> Service['tuskar-api']
Package['tuskar-api'] -> Tuskar_config<||>
if $::tuskar::database_connection {
if($::tuskar::database_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {