Skip to content

Commit

Permalink
drop parameter manage_package
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Sep 1, 2023
1 parent 8446a16 commit 4c89d41
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ And depends on:
* [icinga/icinga] >= 1.0.0 < 3.0.0
* needed if `manage_repos` is set to `true`
* [puppetlabs/chocolatey]
* needed if agent os is windows and if either `manage_package` or `manage_packages` is set to `true`
* needed if agent os is windows and if `manage_packages` is set to `true`
### Limitations

The use of Icinga's own CA is recommended. If you still want to use the Puppet certificates, please note that Puppet 7 uses an intermediate CA by default and Icinga cannot handle its CA certificate, see [Icinga Issue](https://github.com/Icinga/icinga2/pull/8859).
Expand Down
5 changes: 2 additions & 3 deletions manifests/feature/idomysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
$ssl_dir = $icinga2::globals::cert_dir
$ido_mysql_package_name = $icinga2::globals::ido_mysql_package_name
$ido_mysql_schema = $icinga2::globals::ido_mysql_schema
$manage_package = $icinga2::manage_package
$manage_packages = $icinga2::manage_packages

$type = if $import_schema =~ Boolean {
Expand Down Expand Up @@ -201,7 +200,7 @@
}

# install additional package
if $ido_mysql_package_name and ($manage_package or $manage_packages) {
if $ido_mysql_package_name and $manage_packages {
if $facts['os']['family'] == 'debian' {
ensure_resources('file', { '/etc/dbconfig-common' => { ensure => directory, owner => 'root', group => 'root' } })
file { "/etc/dbconfig-common/${ido_mysql_package_name}.conf":
Expand All @@ -222,7 +221,7 @@

# import db schema
if $import_schema {
if $ido_mysql_package_name and ($manage_package or $manage_packages) {
if $ido_mysql_package_name and $manage_packages {
Package[$ido_mysql_package_name] -> Exec['idomysql-import-schema']
}

Expand Down
5 changes: 2 additions & 3 deletions manifests/feature/idopgsql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
$ssl_dir = $icinga2::globals::cert_dir
$ido_pgsql_package_name = $icinga2::globals::ido_pgsql_package_name
$ido_pgsql_schema = $icinga2::globals::ido_pgsql_schema
$manage_package = $icinga2::manage_package
$manage_packages = $icinga2::manage_packages

$enable_ssl = if $ssl_mode and $ssl_mode != 'disabled' {
Expand Down Expand Up @@ -182,7 +181,7 @@
}

# install additional package
if $ido_pgsql_package_name and ($manage_package or $manage_packages) {
if $ido_pgsql_package_name and $manage_packages {
if $facts['os']['family'] == 'debian' {
ensure_resources('file', { '/etc/dbconfig-common' => { ensure => directory, owner => 'root', group => 'root' } })
file { "/etc/dbconfig-common/${ido_pgsql_package_name}.conf":
Expand All @@ -203,7 +202,7 @@

# import db schema
if $import_schema {
if $ido_pgsql_package_name and ($manage_package or $manage_packages) {
if $ido_pgsql_package_name and $manage_packages {
Package[$ido_pgsql_package_name] -> Exec['idopgsql-import-schema']
}

Expand Down
8 changes: 0 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@
# e.g. the release repo on packages.icinga.com repository by default, the EPEL repository or Backports.
# For more information, see http://github.com/icinga/puppet-icinga.
#
# @param manage_package
# Deprecated, use manage_packages.
#
# @param manage_packages
# If set to false packages aren't managed.
#
Expand Down Expand Up @@ -124,7 +121,6 @@
Boolean $enable = true,
Boolean $manage_repo = false,
Boolean $manage_repos = false,
Boolean $manage_package = false,
Boolean $manage_packages = true,
Boolean $manage_selinux = false,
Boolean $manage_service = true,
Expand All @@ -151,10 +147,6 @@
-> Concat <| tag == 'icinga2::config::file' |>
~> Class['icinga2::service']

if $manage_package {
deprecation('manage_package', 'manage_package is deprecated and will be replaced by manage_packages in the future.')
}

if $manage_repos or $manage_repo {
require icinga::repos
if $manage_repo {
Expand Down
3 changes: 1 addition & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
assert_private()

$package_name = $icinga2::globals::package_name
$manage_package = $icinga2::manage_package
$manage_packages = $icinga2::manage_packages
$selinux_package_name = $icinga2::globals::selinux_package_name
$manage_selinux = $icinga2::manage_selinux
Expand All @@ -17,7 +16,7 @@
$user = $icinga2::globals::user
$group = $icinga2::globals::group

if $manage_package or $manage_packages {
if $manage_packages {
if $facts['os']['family'] == 'windows' { Package { provider => chocolatey, } }

package { $package_name:
Expand Down

0 comments on commit 4c89d41

Please sign in to comment.