Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works and fixes #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/apache/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
4 changes: 2 additions & 2 deletions manifests/crowdsec.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# @example
# include psick_profile::crowdsec
class psick_profile::crowdsec (
String $install_class = 'psick_profile::crowdsec::tp',
Hash $collections_hash = {},
String $install_class = 'psick_profile::crowdsec::tp',
Hash $collections_hash = {},
Boolean $manage = $::psick::manage,
Boolean $noop_manage = $::psick::noop_manage,
Boolean $noop_value = $::psick::noop_value,
Expand Down
2 changes: 1 addition & 1 deletion manifests/docker/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/foreman/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/gitlab.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# @param manage_installation Set to true to atually install GitLab. Default,
# false, just manages symlink in /etc/ssh/auth_keys
# @param use_https Define if you want gitlab services to use ssl.
# @param server_name The name to use for the GitLab website. Default: $::fqdn,
# @param server_name The name to use for the GitLab website. Default: $::networking['fqdn'],
# If you set a name different from the local machine fqdn,
# provide custom cert files via *_file_source params
# @param ca_file_source Puppet source for the ca certificate. By default Puppet CA is
Expand Down
2 changes: 1 addition & 1 deletion manifests/grafana/datasource.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
Optional[Hash] $json_data = undef,
Optional[Hash] $secure_json_data = undef,
Optional[Boolean] $editable = undef,
Optional[Hash] $options = {},
[Hash] $options = {},
) {
tp::conf { "grafana::${file_name}":
content => template($template),
Expand Down
4 changes: 2 additions & 2 deletions manifests/grafana/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
unless => "grafana-cli plugins ls | grep ${plugin} | grep '${version}'",
notify => $exec_notify,
require => $exec_require,
path => $::path,
path => $facts['path'],
}
} else {
exec { "grafana plugins uninstall ${plugin}":
command => "grafana-cli plugins uninstall ${plugin}",
onlyif => "grafana-cli plugins ls | grep ${plugin}",
notify => $exec_notify,
require => $exec_require,
path => $::path,
path => $facts['path'],
}
}
}
2 changes: 1 addition & 1 deletion manifests/grafana/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/grafana/user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
exec { "grafana user add ${title}":
command => "${user_dir_path}/${user}_${host}",
require => $exec_require,
path => $::path,
path => $facts['path'],
refreshonly => true,
}
}
2 changes: 1 addition & 1 deletion manifests/influxdb/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
# Attempt to autoconfigure dependencies based on server host. Can be
# overridden with param $exec_params
$exec_require = $server_host ? {
/(localhost|127.0.0.1|$fqdn|$hostname|$ipaddress)/ => [Package[influxdb],Service[influxdb]],
/(localhost|127.0.0.1|$::networking['fqdn']|$::networking['hostname']|$::networking['ip'])/ => [Package[influxdb],Service[influxdb]],
default => [Package[influxdb]],
}
$exec_default_options = {
Expand Down
2 changes: 1 addition & 1 deletion manifests/influxdb/grant.pp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
# Attempt to autoconfigure dependencies based on server host. Can be
# overridden with param $exec_params
$exec_require = $server_host ? {
/(localhost|127.0.0.1|$fqdn|$hostname|$ipaddress)/ => [Package[influxdb],Service[influxdb]],
/(localhost|127.0.0.1|$::networking['fqdn']|$::networking['hostname']|$::networking['ip'])/ => [Package[influxdb],Service[influxdb]],
default => [Package[influxdb]],
}
$exec_default_options = {
Expand Down
2 changes: 1 addition & 1 deletion manifests/influxdb/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/influxdb/user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
# Attempt to autoconfigure dependencies based on server host. Can be
# overridden with param $exec_params
$exec_require = $server_host ? {
/(localhost|127.0.0.1|$fqdn|$hostname|$ipaddress)/ => [Package[influxdb],Service[influxdb]],
/(localhost|127.0.0.1|$::networking['fqdn']|$::networking['hostname']|$::networking['ip'])/ => [Package[influxdb],Service[influxdb]],
default => [Package[influxdb]],
}
$exec_default_options = {
Expand Down
2 changes: 1 addition & 1 deletion manifests/jenkins/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/keepalived.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
# split vs to get role to find correct mapping in hieradata for the configured role-loadbalancing-variables like
# vip, vip_mask and options
# write File for vrrp_instance via given function
$virtualservers=hiera_array('virtualservers', [])
$virtualservers=lookup('virtualservers', Array, 'unique', [])
$virtualservers.each | String $vs | {
$vs_split=split($vs,'-')
$app_role=$vs_split[1]
Expand Down
2 changes: 1 addition & 1 deletion manifests/mariadb/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/mongo/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/mysql/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/nginx/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/openswan/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/openvpn/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/postfix/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/postgresql/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/puppetserver/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/rabbitmq/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
2 changes: 1 addition & 1 deletion manifests/redis/tp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
settings_hash => $settings_hash,
},
'exec' => {
path => $::path,
path => $facts['path'],
},
'file' => {
ensure => $file_ensure,
Expand Down
4 changes: 2 additions & 2 deletions manifests/remediate.pp
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@
if $swarm_init {
exec { 'docker swarm init remediate':
command => "docker swarm init && touch ${remediate_dir}/.docker-swarn-init-remediate.lock",
path => $::path,
path => $facts['path'],
user => $user,
cwd => $remediate_dir,
creates => "${remediate_dir}/.docker-swarn-init-remediate.lock",
}
}
exec { 'docker-compose run remediate':
command => 'docker-compose run remediate start --license-file license.json', # lint:ignore:140char
path => $::path,
path => $facts['path'],
cwd => $remediate_dir,
user => $user,
provider => 'shell',
Expand Down
2 changes: 1 addition & 1 deletion manifests/sensu/uchiwa.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# class psick_profile::sensu::uchiwa
#
class psick_profile::sensu::uchiwa (
Stdlib::Compat::Ip_address $host = '0.0.0.0',
Stdlib::IP::Address $host = '0.0.0.0',
Integer $port = 3000,
Variant[String,Sensitive] $user = 'sensu',
Variant[String,Sensitive] $pass = 'sensu',
Expand Down
28 changes: 19 additions & 9 deletions manifests/vagrant.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# @param The user to use for plugins installation
#
class psick_profile::vagrant (
Variant[Undef,String] $version = undef,
Psick::Ensure $version = undef,
Array $plugins = [],
Array $default_plugins = ['vagrant-vbguest' , 'vagrant-cachier'],
String $user = 'root',

String $module = 'psick_profile',
Boolean $manage = $::psick::manage,
Boolean $noop_manage = $::psick::noop_manage,
Boolean $noop_value = $::psick::noop_value,
Expand All @@ -19,15 +20,24 @@
if $noop_manage {
noop($noop_value)
}
class { 'vagrant':
version => $version,
}

$all_plugins = $default_plugins + $plugins
# Intallation management
case $module {
'psick_profile': {
class { 'psick_profile::vagrant::tp':
ensure => $version,
}
}
default: {
class { 'vagrant':
version => $version,
}
$all_plugins = $default_plugins + $plugins

$all_plugins.each | $plugin | {
::vagrant::plugin { $plugin:
user => $user,
$all_plugins.each | $plugin | {
::vagrant::plugin { $plugin:
user => $user,
}
}
}
}
}
Expand Down
Loading
Loading