From f81b01a15ca9d03bba7b19030925a89795006f32 Mon Sep 17 00:00:00 2001 From: Tim 'bastelfreak' Meusel Date: Tue, 22 Aug 2023 13:03:07 +0200 Subject: [PATCH 1/3] puppet/epel: Allow 5.x --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 6af62bf..20e3a1c 100644 --- a/metadata.json +++ b/metadata.json @@ -26,7 +26,7 @@ }, { "name": "puppet/epel", - "version_requirement": ">=1.0.0 < 5.0.0" + "version_requirement": ">=1.0.0 < 6.0.0" } ], "operatingsystem_support": [ From 981b507aef6be3f587ce53cf03513bd04c7c43e3 Mon Sep 17 00:00:00 2001 From: Tim 'bastelfreak' Meusel Date: Tue, 22 Aug 2023 11:15:10 +0200 Subject: [PATCH 2/3] puppet-strings: autofix --- manifests/authoritative.pp | 16 +++++------ manifests/backends/bind.pp | 22 +++++++-------- manifests/backends/ldap.pp | 26 +++++++++--------- manifests/backends/mysql.pp | 38 +++++++++++++------------- manifests/backends/postgresql.pp | 44 +++++++++++++++--------------- manifests/backends/sqlite.pp | 28 +++++++++---------- manifests/config.pp | 13 ++++----- manifests/init.pp | 12 ++++---- manifests/recursor.pp | 8 +++--- manifests/repo.pp | 29 ++++++++++---------- spec/classes/powerdns_init_spec.rb | 2 +- types/configvalue.pp | 11 ++++---- types/secret.pp | 10 +++---- 13 files changed, 128 insertions(+), 131 deletions(-) diff --git a/manifests/authoritative.pp b/manifests/authoritative.pp index 639aa26..b7240df 100644 --- a/manifests/authoritative.pp +++ b/manifests/authoritative.pp @@ -2,16 +2,16 @@ class powerdns::authoritative ( $package_ensure = $powerdns::params::default_package_ensure, Optional[Array[String]] $install_packages = $powerdns::install_packages, - ) inherits powerdns { +) inherits powerdns { # install the powerdns package - package { $::powerdns::params::authoritative_package: + package { $powerdns::params::authoritative_package: ensure => $package_ensure, } stdlib::ensure_packages($install_packages) # install the right backend - case $::powerdns::backend { + case $powerdns::backend { 'mysql': { include powerdns::backends::mysql } @@ -28,14 +28,14 @@ include powerdns::backends::sqlite } default: { - fail("${::powerdns::backend} is not supported. We only support 'mysql', 'bind', 'postgresql', 'ldap' and 'sqlite' at the moment.") + fail("${powerdns::backend} is not supported. We only support 'mysql', 'bind', 'postgresql', 'ldap' and 'sqlite' at the moment.") } } service { 'pdns': - ensure => running, - name => $::powerdns::params::authoritative_service, - enable => true, - require => Package[$::powerdns::params::authoritative_package], + ensure => running, + name => $powerdns::params::authoritative_service, + enable => true, + require => Package[$powerdns::params::authoritative_package], } } diff --git a/manifests/backends/bind.pp b/manifests/backends/bind.pp index ba7ae65..a02b88c 100644 --- a/manifests/backends/bind.pp +++ b/manifests/backends/bind.pp @@ -3,9 +3,9 @@ # Remove the default simplebind configuration as we prefer to manage PowerDNS # consistently across all operating systems. This file is added to Debian # based systems due to Debian's policies. - file { "${::powerdns::params::authoritative_configdir}/pdns.d/pdns.simplebind.conf": + file { "${powerdns::params::authoritative_configdir}/pdns.d/pdns.simplebind.conf": ensure => absent, - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } # set the configuration variables @@ -19,33 +19,33 @@ powerdns::config { 'bind-config': ensure => present, setting => 'bind-config', - value => "${::powerdns::params::authoritative_configdir}/named.conf", + value => "${powerdns::params::authoritative_configdir}/named.conf", type => 'authoritative', - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } - file { "${::powerdns::params::authoritative_configdir}/named.conf": + file { "${powerdns::params::authoritative_configdir}/named.conf": ensure => file, mode => '0644', owner => 'root', group => 'root', - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } file_line { 'powerdns-bind-baseconfig': ensure => present, - path => "${::powerdns::params::authoritative_configdir}/named.conf", - line => "options { directory \"${::powerdns::params::authoritative_configdir}/named\"; };", + path => "${powerdns::params::authoritative_configdir}/named.conf", + line => "options { directory \"${powerdns::params::authoritative_configdir}/named\"; };", match => 'options', notify => Service['pdns'], - require => File["${::powerdns::params::authoritative_configdir}/named.conf"], + require => File["${powerdns::params::authoritative_configdir}/named.conf"], } - file { "${::powerdns::params::authoritative_configdir}/named": + file { "${powerdns::params::authoritative_configdir}/named": ensure => directory, mode => '0755', owner => 'root', group => 'root', - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } } diff --git a/manifests/backends/ldap.pp b/manifests/backends/ldap.pp index 4b2fabf..0d4ae24 100644 --- a/manifests/backends/ldap.pp +++ b/manifests/backends/ldap.pp @@ -5,7 +5,7 @@ # backend package which we do not want when using another backend such as ldap. package { 'pdns-backend-bind': ensure => purged, - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } } @@ -20,20 +20,20 @@ powerdns::config { 'ldap-host': ensure => present, setting => 'ldap-host', - value => $::powerdns::ldap_host, + value => $powerdns::ldap_host, type => 'authoritative', } powerdns::config { 'ldap-binddn': ensure => present, setting => 'ldap-binddn', - value => $::powerdns::ldap_binddn, + value => $powerdns::ldap_binddn, type => 'authoritative', } - $_ldap_secret = $::powerdns::ldap_secret =~ Sensitive ? { - true => $::powerdns::ldap_secret.unwrap, - false => $::powerdns::ldap_secret + $_ldap_secret = $powerdns::ldap_secret =~ Sensitive ? { + true => $powerdns::ldap_secret.unwrap, + false => $powerdns::ldap_secret } powerdns::config { 'ldap-secret': @@ -46,31 +46,31 @@ powerdns::config { 'ldap-basedn': ensure => present, setting => 'ldap-basedn', - value => $::powerdns::ldap_basedn, + value => $powerdns::ldap_basedn, type => 'authoritative', } powerdns::config { 'ldap-method': ensure => present, setting => 'ldap-method', - value => $::powerdns::ldap_method, + value => $powerdns::ldap_method, type => 'authoritative', } - if $::powerdns::params::ldap_backend_package_name { + if $powerdns::params::ldap_backend_package_name { # set up the powerdns backend - package { $::powerdns::params::ldap_backend_package_name: + package { $powerdns::params::ldap_backend_package_name: ensure => $package_ensure, before => Service['pdns'], - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } } - if $::powerdns::backend_install { + if $powerdns::backend_install { fail('backend_install is not supported with ldap') } - if $::powerdns::backend_create_tables { + if $powerdns::backend_create_tables { fail('backend_create_tables is not supported with ldap') } } diff --git a/manifests/backends/mysql.pp b/manifests/backends/mysql.pp index 313c623..f592407 100644 --- a/manifests/backends/mysql.pp +++ b/manifests/backends/mysql.pp @@ -11,21 +11,21 @@ powerdns::config { 'gmysql-host': ensure => present, setting => 'gmysql-host', - value => $::powerdns::db_host, + value => $powerdns::db_host, type => 'authoritative', } powerdns::config { 'gmysql-port': ensure => present, setting => 'gmysql-port', - value => $::powerdns::db_port, + value => $powerdns::db_port, type => 'authoritative', } powerdns::config { 'gmysql-user': ensure => present, setting => 'gmysql-user', - value => $::powerdns::db_username, + value => $powerdns::db_username, type => 'authoritative', } @@ -46,46 +46,46 @@ powerdns::config { 'gmysql-dbname': ensure => present, setting => 'gmysql-dbname', - value => $::powerdns::db_name, + value => $powerdns::db_name, type => 'authoritative', } - if $::powerdns::params::mysql_backend_package_name { + if $powerdns::params::mysql_backend_package_name { # set up the powerdns backend - package { $::powerdns::params::mysql_backend_package_name: + package { $powerdns::params::mysql_backend_package_name: ensure => $package_ensure, before => Service['pdns'], - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } } - if $::powerdns::backend_install { + if $powerdns::backend_install { # mysql database - if ! defined(Class['::mysql::server']) { + if ! defined(Class['mysql::server']) { $_db_root_password = $powerdns::db_root_password =~ Sensitive ? { true => $powerdns::db_root_password.unwrap, false => $powerdns::db_root_password } - class { '::mysql::server': + class { 'mysql::server': root_password => $_db_root_password, create_root_my_cnf => true, } } - if ! defined(Class['::mysql::server::account_security']) { - class { '::mysql::server::account_security': } + if ! defined(Class['mysql::server::account_security']) { + class { 'mysql::server::account_security': } } } - if $::powerdns::backend_create_tables and $_db_password { + if $powerdns::backend_create_tables and $_db_password { # make sure the database exists - mysql::db { $::powerdns::db_name: - user => $::powerdns::db_username, + mysql::db { $powerdns::db_name: + user => $powerdns::db_username, password => $_db_password, - host => $::powerdns::db_host, - grant => [ 'ALL' ], - sql => [ $::powerdns::mysql_schema_file ], - require => Package[$::powerdns::params::mysql_backend_package_name], + host => $powerdns::db_host, + grant => ['ALL'], + sql => [$powerdns::mysql_schema_file], + require => Package[$powerdns::params::mysql_backend_package_name], } } } diff --git a/manifests/backends/postgresql.pp b/manifests/backends/postgresql.pp index 14a8fc9..16c2c7e 100644 --- a/manifests/backends/postgresql.pp +++ b/manifests/backends/postgresql.pp @@ -3,16 +3,16 @@ if $facts['os']['family'] == 'Debian' { # Remove the debconf gpgsql configuration file auto-generated when using the package # from Debian repository as it interferes with this module's backend configuration. - file { "${::powerdns::params::authoritative_configdir}/pdns.d/pdns.local.gpgsql.conf": + file { "${powerdns::params::authoritative_configdir}/pdns.d/pdns.local.gpgsql.conf": ensure => absent, - require => Package[$::powerdns::params::pgsql_backend_package_name], + require => Package[$powerdns::params::pgsql_backend_package_name], } # The pdns-server package from the Debian APT repo automatically installs the bind # backend package which we do not want when using another backend such as pgsql. package { 'pdns-backend-bind': ensure => purged, - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } } @@ -27,14 +27,14 @@ powerdns::config { 'gpgsql-host': ensure => present, setting => 'gpgsql-host', - value => $::powerdns::db_host, + value => $powerdns::db_host, type => 'authoritative', } powerdns::config { 'gpgsql-user': ensure => present, setting => 'gpgsql-user', - value => $::powerdns::db_username, + value => $powerdns::db_username, type => 'authoritative', } @@ -55,55 +55,55 @@ powerdns::config { 'gpgsql-dbname': ensure => present, setting => 'gpgsql-dbname', - value => $::powerdns::db_name, + value => $powerdns::db_name, type => 'authoritative', } # set up the powerdns backend - if $::powerdns::params::pgsql_backend_package_name { - package { $::powerdns::params::pgsql_backend_package_name: + if $powerdns::params::pgsql_backend_package_name { + package { $powerdns::params::pgsql_backend_package_name: ensure => $package_ensure, before => Service['pdns'], - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } } - if $::powerdns::backend_install { - if ! defined(Class['::postgresql::server']) { + if $powerdns::backend_install { + if ! defined(Class['postgresql::server']) { $_db_root_password = $powerdns::db_root_password =~ Sensitive ? { true => $powerdns::db_root_password.unwrap, false => $powerdns::db_root_password } - class { '::postgresql::server': + class { 'postgresql::server': postgres_password => $_db_root_password, } } } - if $::powerdns::backend_create_tables { + if $powerdns::backend_create_tables { $password_hash = $db_password ? { Undef => undef, - default => postgresql_password($::powerdns::db_username, $_db_password), + default => postgresql_password($powerdns::db_username, $_db_password), } - postgresql::server::db { $::powerdns::db_name: - user => $::powerdns::db_username, + postgresql::server::db { $powerdns::db_name: + user => $powerdns::db_username, password => $password_hash, - require => Package[$::powerdns::params::pgsql_backend_package_name], + require => Package[$powerdns::params::pgsql_backend_package_name], } # define connection settings for powerdns user in order to create tables $connection_settings_powerdns = { - 'PGUSER' => $::powerdns::db_username, + 'PGUSER' => $powerdns::db_username, 'PGPASSWORD' => $_db_password, - 'PGHOST' => $::powerdns::db_host, - 'PGDATABASE' => $::powerdns::db_name, + 'PGHOST' => $powerdns::db_host, + 'PGDATABASE' => $powerdns::db_name, } postgresql_psql { 'Load SQL schema': connect_settings => $connection_settings_powerdns, - command => "\\i ${::powerdns::pgsql_schema_file}", + command => "\\i ${powerdns::pgsql_schema_file}", unless => "SELECT 1 FROM information_schema.tables WHERE table_schema = 'public' AND table_name = 'domains'", - require => Postgresql::Server::Db[$::powerdns::db_name], + require => Postgresql::Server::Db[$powerdns::db_name], } } } diff --git a/manifests/backends/sqlite.pp b/manifests/backends/sqlite.pp index 45d8ace..51bd134 100644 --- a/manifests/backends/sqlite.pp +++ b/manifests/backends/sqlite.pp @@ -11,43 +11,43 @@ powerdns::config { 'gsqlite3-database': ensure => present, setting => 'gsqlite3-database', - value => $::powerdns::db_file, + value => $powerdns::db_file, type => 'authoritative', } # set up the powerdns backend - if $::powerdns::params::sqlite_backend_package_name { - package { $::powerdns::params::sqlite_backend_package_name: + if $powerdns::params::sqlite_backend_package_name { + package { $powerdns::params::sqlite_backend_package_name: ensure => $package_ensure, before => Service['pdns'], - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } } - if $::powerdns::backend_install { - if ! defined(Package[$::powerdns::sqlite_package_name]) { - package { $::powerdns::sqlite_package_name: + if $powerdns::backend_install { + if ! defined(Package[$powerdns::sqlite_package_name]) { + package { $powerdns::sqlite_package_name: ensure => $package_ensure, } } } - if $::powerdns::backend_create_tables { - file { $::powerdns::db_dir: + if $powerdns::backend_create_tables { + file { $powerdns::db_dir: ensure => directory, mode => '0755', owner => 'pdns', group => 'pdns', } - -> file { $::powerdns::db_file: - ensure => present, + -> file { $powerdns::db_file: + ensure => file, mode => '0644', owner => 'pdns', group => 'pdns', } -> exec { 'powerdns-sqlite3-create-tables': - command => "/usr/bin/env sqlite3 ${::powerdns::db_file} < ${::powerdns::sqlite_schema_file}", - unless => "/usr/bin/env test `echo '.tables domains' | sqlite3 ${::powerdns::db_file} | wc -l` -eq 1", + command => "/usr/bin/env sqlite3 ${powerdns::db_file} < ${powerdns::sqlite_schema_file}", + unless => "/usr/bin/env test `echo '.tables domains' | sqlite3 ${powerdns::db_file} | wc -l` -eq 1", before => Service['pdns'], - require => Package[$::powerdns::params::authoritative_package], + require => Package[$powerdns::params::authoritative_package], } } } diff --git a/manifests/config.pp b/manifests/config.pp index 74287ff..4afbc26 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,17 +1,16 @@ # powerdns::config -define powerdns::config( +define powerdns::config ( String $setting = $title, Powerdns::ConfigValue $value = '', Enum['present', 'absent'] $ensure = 'present', Enum['authoritative', 'recursor'] $type = 'authoritative' ) { - $empty_value_allowed = [ 'gmysql-dnssec', 'only-notify', 'allow-notify-from', 'security-poll-suffix', - 'local-ipv6' + 'local-ipv6', ] unless $ensure == 'absent' or ($setting in $empty_value_allowed) { assert_type(Variant[String[1], Integer, Boolean, Sensitive[String[1]]], $value) |$_expected, $_actual| { @@ -29,12 +28,12 @@ } if $type == 'authoritative' { - $path = $::powerdns::params::authoritative_config - $require_package = $::powerdns::params::authoritative_package + $path = $powerdns::params::authoritative_config + $require_package = $powerdns::params::authoritative_package $notify_service = 'pdns' } else { - $path = $::powerdns::params::recursor_config - $require_package = $::powerdns::params::recursor_package + $path = $powerdns::params::recursor_config + $require_package = $powerdns::params::recursor_package $notify_service = 'pdns-recursor' } diff --git a/manifests/init.pp b/manifests/init.pp index eb938b6..ea6e404 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -11,8 +11,8 @@ String[1] $db_name = 'powerdns', String[1] $db_host = 'localhost', Integer[1] $db_port = 3306, - String[1] $db_dir = $::powerdns::params::db_dir, - String[1] $db_file = $::powerdns::params::db_file, + String[1] $db_dir = $powerdns::params::db_dir, + String[1] $db_file = $powerdns::params::db_file, Boolean $require_db_password = true, String[1] $ldap_host = 'ldap://localhost/', Optional[String[1]] $ldap_basedn = undef, @@ -21,14 +21,14 @@ Powerdns::Secret $ldap_secret = undef, Boolean $custom_repo = false, Boolean $custom_epel = false, - Pattern[/4\.[0-9]+/] $version = $::powerdns::params::version, - String[1] $mysql_schema_file = $::powerdns::params::mysql_schema_file, - String[1] $pgsql_schema_file = $::powerdns::params::pgsql_schema_file, + Pattern[/4\.[0-9]+/] $version = $powerdns::params::version, + String[1] $mysql_schema_file = $powerdns::params::mysql_schema_file, + String[1] $pgsql_schema_file = $powerdns::params::pgsql_schema_file, Hash $forward_zones = {}, ) inherits powerdns::params { # Do some additional checks. In certain cases, some parameters are no longer optional. if $authoritative { - if ($::powerdns::backend != 'bind') and ($::powerdns::backend != 'ldap') and ($::powerdns::backend != 'sqlite') and $require_db_password { + if ($powerdns::backend != 'bind') and ($powerdns::backend != 'ldap') and ($powerdns::backend != 'sqlite') and $require_db_password { assert_type(Variant[String[1], Sensitive[String[1]]], $db_password) |$expected, $actual| { fail("'db_password' must be a non-empty string when 'authoritative' == true") } diff --git a/manifests/recursor.pp b/manifests/recursor.pp index ab7216d..88567a0 100644 --- a/manifests/recursor.pp +++ b/manifests/recursor.pp @@ -32,9 +32,9 @@ } service { 'pdns-recursor': - ensure => running, - name => $powerdns::params::recursor_service, - enable => true, - require => Package[$powerdns::params::recursor_package], + ensure => running, + name => $powerdns::params::recursor_service, + enable => true, + require => Package[$powerdns::params::recursor_package], } } diff --git a/manifests/repo.pp b/manifests/repo.pp index 1d3653e..fb1d15e 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -1,27 +1,26 @@ # powerdns::repo class powerdns::repo inherits powerdns { - # The repositories of PowerDNS use a version such as '40' for version 4.0 # and 41 for version 4.1. - $short_version = regsubst($::powerdns::version, /^(\d)\.(\d)$/, '\\1\\2', 'G') + $short_version = regsubst($powerdns::version, /^(\d)\.(\d)$/, '\\1\\2', 'G') case $facts['os']['family'] { 'RedHat': { - unless $::powerdns::custom_epel { - include ::epel + unless $powerdns::custom_epel { + include epel } - Yumrepo['powerdns'] -> Package <| title == $::powerdns::params::authoritative_package |> - Yumrepo['powerdns-recursor'] -> Package <| title == $::powerdns::params::recursor_package |> + Yumrepo['powerdns'] -> Package <| title == $powerdns::params::authoritative_package |> + Yumrepo['powerdns-recursor'] -> Package <| title == $powerdns::params::recursor_package |> - if versioncmp($::operatingsystemmajrelease, '7') <= 0 { + if versioncmp($facts['os']['release']['major'], '7') <= 0 { stdlib::ensure_packages('yum-plugin-priorities') Package['yum-plugin-priorities'] -> Yumrepo['powerdns'] } - if versioncmp($::operatingsystemmajrelease, '8') >= 0 { + if versioncmp($facts['os']['release']['major'], '8') >= 0 { if ($facts['os']['name'] == 'Rocky') { $mirrorlist = "https://mirrors.rockylinux.org/mirrorlist?arch=\$basearch&repo=PowerTools-\$releasever" $gpgkey = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial' @@ -42,7 +41,7 @@ yumrepo { 'powerdns': name => 'powerdns', - descr => "PowerDNS repository for PowerDNS Authoritative - version ${::powerdns::version}", + descr => "PowerDNS repository for PowerDNS Authoritative - version ${powerdns::version}", baseurl => "http://repo.powerdns.com/centos/\$basearch/\$releasever/auth-${short_version}", gpgkey => 'https://repo.powerdns.com/FD380FBB-pub.asc', gpgcheck => 1, @@ -53,7 +52,7 @@ yumrepo { 'powerdns-recursor': name => 'powerdns-recursor', - descr => "PowerDNS repository for PowerDNS Recursor - version ${::powerdns::version}", + descr => "PowerDNS repository for PowerDNS Recursor - version ${powerdns::version}", baseurl => "http://repo.powerdns.com/centos/\$basearch/\$releasever/rec-${short_version}", gpgkey => 'https://repo.powerdns.com/FD380FBB-pub.asc', gpgcheck => 1, @@ -64,7 +63,7 @@ } 'Debian': { - include ::apt + include apt $os = downcase($facts['os']['name']) @@ -78,7 +77,7 @@ ensure => present, location => "http://repo.powerdns.com/${os}", repos => 'main', - release => "${::lsbdistcodename}-auth-${short_version}", + release => "${facts['os']['distro']['codename']}-auth-${short_version}", architecture => 'amd64', require => Apt::Key['powerdns'], } @@ -87,7 +86,7 @@ ensure => present, location => "http://repo.powerdns.com/${os}", repos => 'main', - release => "${::lsbdistcodename}-rec-${short_version}", + release => "${facts['os']['distro']['codename']}-rec-${short_version}", architecture => 'amd64', require => Apt::Source['powerdns'], } @@ -99,8 +98,8 @@ require => Apt::Source['powerdns-recursor'], } - Apt::Pin['powerdns'] -> Package <| title == $::powerdns::params::authoritative_package |> - Apt::Pin['powerdns'] -> Package <| title == $::powerdns::params::recursor_package |> + Apt::Pin['powerdns'] -> Package <| title == $powerdns::params::authoritative_package |> + Apt::Pin['powerdns'] -> Package <| title == $powerdns::params::recursor_package |> } 'FreeBSD': { diff --git a/spec/classes/powerdns_init_spec.rb b/spec/classes/powerdns_init_spec.rb index bd82453..395a7ae 100644 --- a/spec/classes/powerdns_init_spec.rb +++ b/spec/classes/powerdns_init_spec.rb @@ -284,7 +284,7 @@ it { is_expected.to contain_package(sqlite_binary_package_name).with('ensure' => 'installed') } it do is_expected.to contain_file('/var/lib/powerdns/db.sqlite3').with( - 'ensure' => 'present', + 'ensure' => 'file', 'owner' => 'pdns', 'group' => 'pdns', 'mode' => '0644', diff --git a/types/configvalue.pp b/types/configvalue.pp index 349a885..19ad55b 100644 --- a/types/configvalue.pp +++ b/types/configvalue.pp @@ -1,7 +1,6 @@ type Powerdns::ConfigValue = Variant[ - String, - Integer, - Boolean, - Sensitive[String[1]] - ] - + String, + Integer, + Boolean, + Sensitive[String[1]] +] diff --git a/types/secret.pp b/types/secret.pp index c92c6dc..87042c5 100644 --- a/types/secret.pp +++ b/types/secret.pp @@ -1,6 +1,6 @@ type Powerdns::Secret = Optional[ - Variant[ - String[1], - Sensitive[String[1]] - ] - ] + Variant[ + String[1], + Sensitive[String[1]] + ] +] From 341ff74bc60777de9d9dd2c9f2b4e335a9a5df71 Mon Sep 17 00:00:00 2001 From: Tim 'bastelfreak' Meusel Date: Tue, 22 Aug 2023 10:38:34 +0200 Subject: [PATCH 3/3] .fixtures.yml: Migrate to git it's best practice to use git branches in unit tests, not the latest forge releases. This approach tries to catch breaking changes or regressions in depenencies before they are released. --- .fixtures.yml | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 60ed40e..d829ffc 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,32 +1,12 @@ +--- fixtures: - forge_modules: - epel: - repo: "puppet/epel" - ref: "3.0.1" - stdlib: - repo: "puppetlabs/stdlib" - ref: "9.3.0" - mysql: - repo: "puppetlabs/mysql" - ref: "15.0.0" - postgresql: - repo: "puppetlabs/postgresql" - ref: "9.1.0" - concat: - repo: "puppetlabs/concat" - ref: "5.3.0" - apt: - repo: "puppetlabs/apt" - ref: "6.3.0" - yumrepo: - repo: "puppetlabs/yumrepo_core" - puppet_version: ">= 6.0.0" - ref: "1.0.3" - augeas: - repo: "puppetlabs/augeas_core" - puppet_version: ">= 6.0.0" - ref: "1.0.4" repositories: - systemd: 'https://github.com/voxpupuli/puppet-systemd' - symlinks: - powerdns: "#{source_dir}" + concat: https://github.com/puppetlabs/puppetlabs-concat.git + stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git + epel: https://github.com/voxpupuli/puppet-epel.git + mysql: https://github.com/puppetlabs/puppetlabs-mysql.git + postgresql: https://github.com/puppetlabs/puppetlabs-postgresql.git + apt: https://github.com/puppetlabs/puppetlabs-apt.git + systemd: https://github.com/voxpupuli/puppet-systemd + yumrepo_core: https://github.com/puppetlabs/puppetlabs-yumrepo_core.git + augeas_core: https://github.com/puppetlabs/puppetlabs-augeas_core.git