Last active
May 7, 2019 17:31
-
-
Save electrofelix/1a7a70da3f864c0561666cd3d4d7eed7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class mysensu::setup() { | |
# have a number of other settings applied to this resource | |
class { '::sensu': | |
use_embedded_ruby => true, | |
sensu_plugin_provider => 'sensu_gem', | |
} | |
# because the package installs it's on CA certs and we have an internal | |
# bundle, need to replace the package one anytime it is installed/updated | |
file { '/opt/sensu/embedded/ssl/cert.pem': | |
source => 'file:/etc/ssl/certs/ca-certificates.crt', | |
# backup => true causes backup to occur under source directory instead of | |
# attempting to use a common filebucket which doesn't exist. | |
backup => true, | |
show_diff => false, | |
subscribe => [ | |
Exec['ca_cert_update'], | |
Package['sensu'], | |
] | |
} | |
# correct way to ensure the resource collector finds the resources | |
Package <| provider == 'sensu_gem' |> { | |
require +> File['/opt/sensu/embedded/ssl/cert.pem'] | |
} | |
package { 'sensu-plugins-puppet': | |
ensure => '1.2.0', | |
provider => 'sensu_gem', | |
source => $::sensu::gem_install_options[0]['--source'], | |
install_options => $package_gem_install_options, | |
require => Class['ca_cert'], | |
} | |
} |
This file contains hidden or 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
class mysensu::setup() { | |
# have a number of other settings applied to this resource | |
class { '::sensu': | |
use_embedded_ruby => true, | |
sensu_plugin_provider => 'sensu_gem', | |
} | |
# because the package installs it's on CA certs and we have an internal | |
# bundle, need to replace the package one anytime it is installed/updated | |
file { '/opt/sensu/embedded/ssl/cert.pem': | |
source => 'file:/etc/ssl/certs/ca-certificates.crt', | |
# backup => true causes backup to occur under source directory instead of | |
# attempting to use a common filebucket which doesn't exist. | |
backup => true, | |
show_diff => false, | |
subscribe => [ | |
Exec['ca_cert_update'], | |
Package['sensu'], | |
] | |
} -> Package <| provider == 'sensu_gem' |> # <-- beginning to suspect this is not the right way to do this | |
package { 'sensu-plugins-puppet': | |
ensure => '1.2.0', | |
provider => 'sensu_gem', | |
source => $::sensu::gem_install_options[0]['--source'], | |
install_options => $package_gem_install_options, | |
require => Class['ca_cert'], # <-- is this overwriting the resource collector ordering above? | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment