Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Fixed order after package install
Browse files Browse the repository at this point in the history
  • Loading branch information
jorritfolmer committed Feb 24, 2018
1 parent 1de8699 commit 917f439
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 3.9.1

- Fixed issue where splunk first time run would happen before install

### 3.9.0

- Add setting to control maxKBps in limits.conf
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -995,14 +995,15 @@ These people haves contributed pull requests, issues, ideas or otherwise spent t

- Chris Bowles (cbowlesUT)
- Dimitri Tischenko (timidri)
- dkangel37
- FlorinTar
- jsushetski
- Michael Fyffe (TraGicCode)
- Miro (mirogta)
- Nate McCurdy (natemccurdy)
- negast
- Steve Myers (stmyers)
- RampentPotato
- Steve Myers (stmyers)
- TheChuckMo

## License
Expand Down
56 changes: 42 additions & 14 deletions manifests/installed.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,57 @@
package { $package:
ensure => installed,
}
-> exec { 'splunk initial run':
command => "${splunk_home}/bin/splunk version --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
user => $splunk_os_user,
creates => "${splunk_home}/etc/system/local/server.conf",
notify => Exec['splunk enable boot-start'],
}
-> exec { 'splunk enable boot-start':
command => "${splunk_home}/bin/splunk enable boot-start -user ${splunk_os_user} --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
refreshonly => true,
}
} elsif $version == undef and package_source != undef {
package { $package:
ensure => installed,
name => $package_source,
}
-> exec { 'splunk initial run':
command => "${splunk_home}/bin/splunk version --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
user => $splunk_os_user,
creates => "${splunk_home}/etc/system/local/server.conf",
notify => Exec['splunk enable boot-start'],
}
-> exec { 'splunk enable boot-start':
command => "${splunk_home}/bin/splunk enable boot-start -user ${splunk_os_user} --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
refreshonly => true,
}
} else {
package { $package:
ensure => $version,
}
}
exec { 'splunk initial run':
command => "${splunk_home}/bin/splunk version --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
user => $splunk_os_user,
creates => "${splunk_home}/etc/system/local/server.conf",
notify => Exec['splunk enable boot-start'],
}
exec { 'splunk enable boot-start':
command => "${splunk_home}/bin/splunk enable boot-start -user ${splunk_os_user} --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
refreshonly => true,
-> exec { 'splunk initial run':
command => "${splunk_home}/bin/splunk version --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
user => $splunk_os_user,
creates => "${splunk_home}/etc/system/local/server.conf",
notify => Exec['splunk enable boot-start'],
}
-> exec { 'splunk enable boot-start':
command => "${splunk_home}/bin/splunk enable boot-start -user ${splunk_os_user} --accept-license --answer-yes --no-prompt",
path => ["${splunk_home}/bin", '/bin', '/sbin', '/usr/bin', '/usr/sbin'],
require => Package[$package],
refreshonly => true,
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jorritfolmer-splunk",
"version": "3.9.0",
"version": "3.9.1",
"author": "Jorrit Folmer",
"summary": "Deploy Splunk indexers, search heads and universal forwarders into any imaginable topology, distributed or (multisite) clustered.",
"license": "MIT",
Expand Down

0 comments on commit 917f439

Please sign in to comment.