-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from justintime32/fix_class_params
Fix osquery class parameters
- Loading branch information
Showing
5 changed files
with
39 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
# class osquery::config - manage json config in /etc/osquery | ||
class osquery::config ( | ||
class osquery::config { | ||
|
||
$settings = $::osquery::params::settings, | ||
|
||
){ | ||
|
||
file { $::osquery::params::config: | ||
file { $::osquery::config: | ||
ensure => present, | ||
owner => root, | ||
group => root, | ||
content => sorted_json($::settings), # array to JSON lib | ||
require => Package[$::osquery::params::package_name], | ||
notify => Service[$::osquery::params::service_name], | ||
content => sorted_json($::osquery::settings), # array to JSON lib | ||
require => Package[$::osquery::package_name], | ||
notify => Service[$::osquery::service_name], | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# osquery::service - manage services | ||
class osquery::service { | ||
|
||
service { $::osquery::params::service_name: | ||
ensure => running, | ||
enable => true, | ||
service { $::osquery::service_name: | ||
ensure => $::osquery::service_enable, | ||
enable => $::osquery::service_enable, | ||
hasstatus => true, | ||
hasrestart => true, | ||
require => Package[$::osquery::params::package_name], | ||
require => Package[$::osquery::package_name], | ||
} | ||
|
||
} |