From 8034c50d641fcba35983b2f0eb2d9c3d093ccfc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= <hugo@lysator.liu.se> Date: Tue, 24 Oct 2023 01:30:18 +0200 Subject: [PATCH] Rename module to ZNC. --- README.md | 8 ++++---- manifests/ident.pp | 16 ++++++++-------- manifests/init.pp | 6 +++--- manifests/module.pp | 2 +- manifests/sasl.pp | 8 ++++---- manifests/setup.pp | 4 ++-- metadata.json | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 7310bea..5795a48 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,16 @@ https://wiki.znc.in/ZNC ```puppet # Adds a basic ZNC configuration -include ::irc_bouncer +include ::znc # Adding this configures cyrusauth and SASL authentication, through PAM. # Note that PAM needs to be configured separately. -include ::irc_bouncer::sasl +include ::znc::sasl # Adds a basic identd instance -include ::irc_bouncer::ident +include ::znc::ident # Additional ZNC modules can be loaded through -class irc_bouncer::module { 'extra-module': +class znc::module { 'extra-module': } ``` diff --git a/manifests/ident.pp b/manifests/ident.pp index 5fa4b2a..da335a7 100644 --- a/manifests/ident.pp +++ b/manifests/ident.pp @@ -1,11 +1,11 @@ # @summary Configures ident # # https://en.wikipedia.org/wiki/Ident_protocol -class irc_bouncer::ident { +class znc::ident { ensure_packages(['oidentd',], { ensure => installed, }) $oident_conf = @("EOF") - user "${irc_bouncer::setup::user}" { + user "${znc::setup::user}" { default { allow spoof allow spoof_all @@ -15,7 +15,7 @@ class irc_bouncer::ident { file { '/etc/oidentd.conf': ensure => file, - group => $irc_bouncer::setup::user, + group => $znc::setup::user, mode => '0664', content => $oident_conf, } @@ -25,16 +25,16 @@ class irc_bouncer::ident { enable => true, } - irc_bouncer::module { 'identfile': } + znc::module { 'identfile': } - file { "${irc_bouncer::setup::datadir}/moddata/identfile": + file { "${znc::setup::datadir}/moddata/identfile": ensure => directory, - owner => $irc_bouncer::setup::user, + owner => $znc::setup::user, } - file { "${irc_bouncer::setup::datadir}/moddata/identfile/.registry": + file { "${znc::setup::datadir}/moddata/identfile/.registry": ensure => file, - owner => $irc_bouncer::setup::user, + owner => $znc::setup::user, content => [ 'File /etc/oidentd.conf', 'Format global { reply "%user%" }', diff --git a/manifests/init.pp b/manifests/init.pp index acb1e53..ac7a15e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,10 +1,10 @@ # @summary -class irc_bouncer { - require irc_bouncer::setup +class znc { + require znc::setup service { 'znc': ensure => running, enable => true, - # subscribe => [ Class['::irc_bouncer::setup'], ], + # subscribe => [ Class['::znc::setup'], ], } } diff --git a/manifests/module.pp b/manifests/module.pp index 0f16c41..994eba5 100644 --- a/manifests/module.pp +++ b/manifests/module.pp @@ -8,7 +8,7 @@ # Name of the module to load # @param args # Extra arguments to pass to module. -define irc_bouncer::module ( +define znc::module ( String $module = $name, Array[String] $args = [], ) { diff --git a/manifests/sasl.pp b/manifests/sasl.pp index a993e01..929da33 100644 --- a/manifests/sasl.pp +++ b/manifests/sasl.pp @@ -7,7 +7,7 @@ # # @param package # Name of the package providing saslauthd -class irc_bouncer::sasl ( +class znc::sasl ( String $package = 'sasl2-bin', ) { ensure_packages([$package], { ensure => installed, }) @@ -35,12 +35,12 @@ class irc_bouncer::sasl ( enable => true, } - file { "${irc_bouncer::setup::datadir}/moddata/cyrusauth": + file { "${znc::setup::datadir}/moddata/cyrusauth": ensure => directory, - owner => $irc_bouncer::setup::user, + owner => $znc::setup::user, } - irc_bouncer::module { 'cyrusauth': + znc::module { 'cyrusauth': args => ['saslauthd'], } } diff --git a/manifests/setup.pp b/manifests/setup.pp index c8ab4ff..996669d 100644 --- a/manifests/setup.pp +++ b/manifests/setup.pp @@ -1,6 +1,6 @@ # @summary Initial configuration of ZNC # @api private -class irc_bouncer::setup ( +class znc::setup ( Stdlib::Absolutepath $datadir = '/var/lib/znc', String $user = 'znc', String $package = 'znc', @@ -51,7 +51,7 @@ class irc_bouncer::setup ( line => "SSLKeyFile = /etc/letsencrypt/live/${certname}/privkey.pem", } - irc_bouncer::module { [ + znc::module { [ 'webadmin', 'fail2ban', 'chansaver', diff --git a/metadata.json b/metadata.json index dd57493..1b9fe62 100644 --- a/metadata.json +++ b/metadata.json @@ -4,7 +4,7 @@ "author": "hugo", "summary": "Configures the ZNC IRC bouncer", "license": "Apache-2.0", - "source": "https://git.lysator.liu.se/lysator/puppet/irc_bouncer", + "source": "https://git.lysator.liu.se/lysator/puppet/znc", "operatingsystem_support": [ { "operatingsystem": "Debian", -- GitLab