Open martijndegouw opened 3 years ago
Applying the following patch seems to resolve my issue:
diff --git a/manifests/enterprise/config.pp b/manifests/enterprise/config.pp
index 0568f19..d0513c7 100644
--- a/manifests/enterprise/config.pp
+++ b/manifests/enterprise/config.pp
@@ -13,6 +13,7 @@ class splunk::enterprise::config () {
secret => $splunk::enterprise::secret,
splunk_user => $splunk::enterprise::splunk_user,
mode => 'agent',
+ require => Class['splunk::enterprise::install'],
notify => Class['splunk::enterprise::service'],
}
}
@@ -26,6 +27,7 @@ class splunk::enterprise::config () {
secret => $splunk::enterprise::secret,
splunk_user => $splunk::enterprise::splunk_user,
mode => 'agent',
+ require => Class['splunk::enterprise::install'],
notify => Class['splunk::enterprise::service'],
}
}
But I'm not 100% sure this is the right approach.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
Puppet tries to write to /opt/splunk/etc/splunk.secret before splunk is installed.
What behaviour did you expect instead
I expect puppet first tries to install Splunk, then applies all the password/seed files, and then starts the service.
Output log
Any additional information you'd like to impart
In enterprise.pp I clearly see an order being enforced install -> config ~> service. I'm really confused why puppet tries to apply classes that are from the config class.