From 6f2e5fc86e49c12b12eef39fc69e0e810a32c318 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 18 Mar 2017 18:46:43 +0000 Subject: [PATCH] puppet 4 foo Signed-off-by: root Signed-off-by: Martin Zobel-Helas --- manifests/site.pp | 8 +-- modules/acpi/manifests/init.pp | 2 +- modules/apache2/manifests/init.pp | 2 +- modules/apache2/manifests/site.pp | 2 +- modules/apache2/templates/default-index.html | 8 +-- modules/apache2/templates/disabled-index.html | 8 +-- modules/apache2/templates/puppet-config.erb | 2 +- modules/bacula/manifests/client.pp | 4 +- ...torage-per-node.pp => storage_per_node.pp} | 2 +- modules/bacula/templates/bacula-fd.conf.erb | 26 ++++---- .../bacula/templates/bacula-idle-restart.erb | 4 +- .../files/apt.conf.d/local-compression | 0 .../files/apt.conf.d/local-langs | 0 .../files/apt.conf.d/local-pdiffs | 0 .../files/apt.conf.d/local-recommends | 0 .../files/apt.preferences | 0 .../files/basic-ssh_known_hosts | 0 .../files/check_for_updates | 0 .../files/db.debian.org.gpg | Bin .../files/dsa-puppet-stuff.cron.ignore | 0 .../files/etc.profile.d/timeout.sh | 0 .../files/etc.zsh/zprofile | 0 .../files/molly-guard/10-check-kvm | 0 .../files/molly-guard/15-acquire-reboot-lock | 0 .../files/nsswitch.conf | 0 .../files/puppet.default | 0 .../files/root-dotfiles/bashrc | 0 .../files/root-dotfiles/profile | 0 .../files/root-dotfiles/screenrc | 0 .../files/root-dotfiles/selected_editor | 0 .../files/root-dotfiles/tmux.conf | 0 .../files/root-dotfiles/vimrc | 0 .../{debian-org => debian_org}/files/timezone | 0 .../files/ud-replicated.service | 0 .../lib/facter/architecture.rb | 0 .../lib/facter/cluster.rb | 0 .../lib/facter/debsso.rb | 0 .../lib/facter/hosts.rb | 2 +- .../lib/facter/ipaddresses.rb | 0 .../lib/facter/lsb-for-bsd.rb | 0 .../lib/facter/mounts.rb | 0 .../lib/facter/mta.rb | 0 .../lib/facter/onion-services.rb | 0 .../lib/facter/os-for-bsd.rb | 0 .../lib/facter/paths.rb | 2 +- .../lib/facter/raidarray.rb | 12 ++-- .../lib/facter/roleaccounts.rb | 8 +-- .../lib/facter/servertype.rb | 2 +- .../lib/facter/software.rb | 28 ++++----- .../lib/facter/system-hw.rb | 4 +- .../manifests/apt.pp | 20 +++---- .../manifests/init.pp | 56 +++++++++--------- .../manifests/radvd.pp | 0 .../misc/hoster.yaml | 0 .../misc/local.yaml | 0 .../templates/debian_facts.yaml.erb | 0 .../templates/dsa-puppet-stuff.cron.erb | 0 .../templates/ldap.conf.erb | 0 .../pam.common-session-noninteractive.erb | 0 .../templates/pam.common-session.erb | 0 .../templates/puppet.conf.erb | 3 + .../templates/rc.local.erb | 2 +- modules/exim/manifests/init.pp | 12 ++-- modules/exim/templates/eximconf.erb | 10 ++-- modules/exim/templates/mailname.erb | 2 +- modules/ferm/manifests/init.pp | 4 +- .../manifests/{per-host.pp => per_host.pp} | 2 +- modules/ferm/manifests/rule.pp | 2 +- .../{ferm-rule.erb => ferm_rule.erb} | 8 +-- modules/ferm/templates/me.conf.erb | 8 +-- modules/hosts/templates/etc-hosts.erb | 2 +- modules/linux/manifests/init.pp | 4 +- modules/monit/manifests/init.pp | 2 +- modules/motd/templates/motd.erb | 4 +- ...{master-per-node.pp => master_per_node.pp} | 4 +- ...f-per-node.erb => munin.conf_per_node.erb} | 0 .../templates/munin-node.plugin.conf.erb | 4 +- ...bsolete-packages-ignore.d-hostspecific.erb | 4 +- .../templates/popularity-contest.conf.erb | 4 +- .../templates/authorized_keys.erb | 2 +- modules/portforwarder/templates/xinetd.erb | 2 +- .../parser/functions/entropy_provider.rb | 2 +- .../lib/puppet/parser/functions/nodeinfo.rb | 2 +- modules/resolv/templates/resolv.conf.erb | 2 +- .../manifests/init.pp | 2 +- modules/samhain/templates/samhainrc.erb | 4 +- modules/site/manifests/init.pp | 4 +- modules/site/manifests/sysctl.pp | 2 +- modules/ssh/manifests/init.pp | 2 +- modules/ssh/templates/authorized_keys.erb | 4 +- modules/ssh/templates/ssh_config.erb | 2 +- modules/ssh/templates/sshd_config.erb | 4 +- modules/stunnel4/templates/stunnel.conf.erb | 22 +++---- .../files/syslog-ng.default | 0 .../files/syslog-ng.logrotate | 0 .../files/syslog-ng.logrotate.loggers | 0 .../files/syslog-ng.service | 0 .../manifests/init.pp | 12 ++-- .../templates/syslog-ng.conf.erb | 30 +++++----- 99 files changed, 192 insertions(+), 189 deletions(-) rename modules/bacula/manifests/{storage-per-node.pp => storage_per_node.pp} (94%) rename modules/{debian-org => debian_org}/files/apt.conf.d/local-compression (100%) rename modules/{debian-org => debian_org}/files/apt.conf.d/local-langs (100%) rename modules/{debian-org => debian_org}/files/apt.conf.d/local-pdiffs (100%) rename modules/{debian-org => debian_org}/files/apt.conf.d/local-recommends (100%) rename modules/{debian-org => debian_org}/files/apt.preferences (100%) rename modules/{debian-org => debian_org}/files/basic-ssh_known_hosts (100%) rename modules/{debian-org => debian_org}/files/check_for_updates (100%) rename modules/{debian-org => debian_org}/files/db.debian.org.gpg (100%) rename modules/{debian-org => debian_org}/files/dsa-puppet-stuff.cron.ignore (100%) rename modules/{debian-org => debian_org}/files/etc.profile.d/timeout.sh (100%) rename modules/{debian-org => debian_org}/files/etc.zsh/zprofile (100%) rename modules/{debian-org => debian_org}/files/molly-guard/10-check-kvm (100%) rename modules/{debian-org => debian_org}/files/molly-guard/15-acquire-reboot-lock (100%) rename modules/{debian-org => debian_org}/files/nsswitch.conf (100%) rename modules/{debian-org => debian_org}/files/puppet.default (100%) rename modules/{debian-org => debian_org}/files/root-dotfiles/bashrc (100%) rename modules/{debian-org => debian_org}/files/root-dotfiles/profile (100%) rename modules/{debian-org => debian_org}/files/root-dotfiles/screenrc (100%) rename modules/{debian-org => debian_org}/files/root-dotfiles/selected_editor (100%) rename modules/{debian-org => debian_org}/files/root-dotfiles/tmux.conf (100%) rename modules/{debian-org => debian_org}/files/root-dotfiles/vimrc (100%) rename modules/{debian-org => debian_org}/files/timezone (100%) rename modules/{debian-org => debian_org}/files/ud-replicated.service (100%) rename modules/{debian-org => debian_org}/lib/facter/architecture.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/cluster.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/debsso.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/hosts.rb (97%) rename modules/{debian-org => debian_org}/lib/facter/ipaddresses.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/lsb-for-bsd.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/mounts.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/mta.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/onion-services.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/os-for-bsd.rb (100%) rename modules/{debian-org => debian_org}/lib/facter/paths.rb (97%) rename modules/{debian-org => debian_org}/lib/facter/raidarray.rb (93%) rename modules/{debian-org => debian_org}/lib/facter/roleaccounts.rb (95%) rename modules/{debian-org => debian_org}/lib/facter/servertype.rb (89%) rename modules/{debian-org => debian_org}/lib/facter/software.rb (95%) rename modules/{debian-org => debian_org}/lib/facter/system-hw.rb (95%) rename modules/{debian-org => debian_org}/manifests/apt.pp (85%) rename modules/{debian-org => debian_org}/manifests/init.pp (78%) rename modules/{debian-org => debian_org}/manifests/radvd.pp (100%) rename modules/{debian-org => debian_org}/misc/hoster.yaml (100%) rename modules/{debian-org => debian_org}/misc/local.yaml (100%) rename modules/{debian-org => debian_org}/templates/debian_facts.yaml.erb (100%) rename modules/{debian-org => debian_org}/templates/dsa-puppet-stuff.cron.erb (100%) rename modules/{debian-org => debian_org}/templates/ldap.conf.erb (100%) rename modules/{debian-org => debian_org}/templates/pam.common-session-noninteractive.erb (100%) rename modules/{debian-org => debian_org}/templates/pam.common-session.erb (100%) rename modules/{debian-org => debian_org}/templates/puppet.conf.erb (92%) rename modules/{debian-org => debian_org}/templates/rc.local.erb (96%) rename modules/ferm/manifests/{per-host.pp => per_host.pp} (99%) rename modules/ferm/templates/{ferm-rule.erb => ferm_rule.erb} (58%) rename modules/munin/manifests/{master-per-node.pp => master_per_node.pp} (60%) rename modules/munin/{templates/munin.conf-per-node.erb => munin.conf_per_node.erb} (100%) rename modules/{rng-tools => rng_tools}/manifests/init.pp (90%) rename modules/{syslog-ng => syslog_ng}/files/syslog-ng.default (100%) rename modules/{syslog-ng => syslog_ng}/files/syslog-ng.logrotate (100%) rename modules/{syslog-ng => syslog_ng}/files/syslog-ng.logrotate.loggers (100%) rename modules/{syslog-ng => syslog_ng}/files/syslog-ng.service (100%) rename modules/{syslog-ng => syslog_ng}/manifests/init.pp (73%) rename modules/{syslog-ng => syslog_ng}/templates/syslog-ng.conf.erb (95%) diff --git a/manifests/site.pp b/manifests/site.pp index 178fc2d31..28a443c29 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -21,10 +21,10 @@ Service { node default { include site include munin - include syslog-ng + include syslog_ng include sudo include ssh - include debian-org + include debian_org include monit include time include ssl @@ -69,7 +69,7 @@ node default { include bacula::storage } - if $::kernel == Linux { + if $::kernel == 'Linux' { include linux include acpi } elsif $::kernel == 'GNU/kFreeBSD' { @@ -113,7 +113,7 @@ node default { } if $::hostname in [geo3,wieck] { - include debian-org::radvd + include debian_org::radvd } if ($::postgres) { diff --git a/modules/acpi/manifests/init.pp b/modules/acpi/manifests/init.pp index feadbe356..f2c621b32 100644 --- a/modules/acpi/manifests/init.pp +++ b/modules/acpi/manifests/init.pp @@ -1,6 +1,6 @@ class acpi { if ! ($::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) { - if ($::lsbmajdistrelease >= 8) { + if ($::lsbmajdistrelease >= '8') { package { 'acpid': ensure => purged } diff --git a/modules/apache2/manifests/init.pp b/modules/apache2/manifests/init.pp index 2e7592721..19400ad6d 100644 --- a/modules/apache2/manifests/init.pp +++ b/modules/apache2/manifests/init.pp @@ -105,7 +105,7 @@ class apache2 { apache2::module { 'mpm_prefork': ensure => absent } apache2::module { 'mpm_worker': } } - if $::lsbmajdistrelease > 7 { + if $::lsbmajdistrelease > '7' { file { '/etc/apache2/mods-available/mpm_worker.conf': content => template('apache2/mpm_worker.erb'), } diff --git a/modules/apache2/manifests/site.pp b/modules/apache2/manifests/site.pp index 2a7257ba7..ff1ee20e1 100644 --- a/modules/apache2/manifests/site.pp +++ b/modules/apache2/manifests/site.pp @@ -46,7 +46,7 @@ define apache2::site ( } } - if $::lsbmajdistrelease <= 7 { + if $::lsbmajdistrelease <= '7' { $symlink = "/etc/apache2/sites-enabled/${name}" } else { $symlink = "/etc/apache2/sites-enabled/${name}.conf" diff --git a/modules/apache2/templates/default-index.html b/modules/apache2/templates/default-index.html index ffb58f70a..c8c9c4019 100644 --- a/modules/apache2/templates/default-index.html +++ b/modules/apache2/templates/default-index.html @@ -1,16 +1,16 @@ - Welcome to <%= hostname %>! + Welcome to <%= @hostname %>! -

Welcome to <%= hostname %>!

+

Welcome to <%= @hostname %>!

-This is <%= hostname %>, a system run by and for the Debian Project. +This is <%= @hostname %>, a system run by and for the Debian Project. She does stuff. What kind of stuff and who our kind sponsors are you might learn on -db.debian.org. +db.debian.org.


diff --git a/modules/apache2/templates/disabled-index.html b/modules/apache2/templates/disabled-index.html index b9a3c720c..104efd48a 100644 --- a/modules/apache2/templates/disabled-index.html +++ b/modules/apache2/templates/disabled-index.html @@ -1,18 +1,18 @@ - Welcome to <%= hostname %>! + Welcome to <%= @hostname %>! -

Welcome to <%= hostname %>!

+

Welcome to <%= @hostname %>!

-This is <%= hostname %>, a system run by and for the Debian Project. +This is <%= @hostname %>, a system run by and for the Debian Project.

The service you have requested is currently disabled.

The reason for that and who our kind sponsors are you might learn on -db.debian.org. +db.debian.org.


diff --git a/modules/apache2/templates/puppet-config.erb b/modules/apache2/templates/puppet-config.erb index 966ff3fec..3a7134d45 100644 --- a/modules/apache2/templates/puppet-config.erb +++ b/modules/apache2/templates/puppet-config.erb @@ -10,7 +10,7 @@ SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!eNULL:!LOW:!MD5:!EXP:!RC4:!SEED:!DSS <% end -%> - <%- if has_variable?("apache2deb9") && apache2deb9 == "true" -%> + <%- if has_variable?("apache2deb9") && @apache2deb9 == "true" -%> SSLUseStapling On # the default size is 32k, but we make it 1M. diff --git a/modules/bacula/manifests/client.pp b/modules/bacula/manifests/client.pp index 230b29f5a..05234fc9b 100644 --- a/modules/bacula/manifests/client.pp +++ b/modules/bacula/manifests/client.pp @@ -1,5 +1,5 @@ class bacula::client inherits bacula { - @@bacula::storage-per-node { $::fqdn: } + @@bacula::storage_per_node { $::fqdn: } if ! getfromhash($site::nodeinfo, 'not-bacula-client') { @@bacula::node { $::fqdn: @@ -50,7 +50,7 @@ class bacula::client inherits bacula { require => Package['bacula-fd'], notify => Service['bacula-fd'], } - if ($::lsbmajdistrelease >= 9 and $systemd) { + if ($::lsbmajdistrelease >= '9' and $systemd) { file { '/etc/systemd/system/bacula-fd.service.d': ensure => directory, mode => '0755', diff --git a/modules/bacula/manifests/storage-per-node.pp b/modules/bacula/manifests/storage_per_node.pp similarity index 94% rename from modules/bacula/manifests/storage-per-node.pp rename to modules/bacula/manifests/storage_per_node.pp index 501921db3..0a009456c 100644 --- a/modules/bacula/manifests/storage-per-node.pp +++ b/modules/bacula/manifests/storage_per_node.pp @@ -1,4 +1,4 @@ -define bacula::storage-per-node() { +define bacula::storage_per_node() { include bacula diff --git a/modules/bacula/templates/bacula-fd.conf.erb b/modules/bacula/templates/bacula-fd.conf.erb index 3597a0c78..116d3c585 100644 --- a/modules/bacula/templates/bacula-fd.conf.erb +++ b/modules/bacula/templates/bacula-fd.conf.erb @@ -6,35 +6,35 @@ # List Directors who are permitted to contact this File daemon Director { - Name = <%= bacula_director_name %> - Password = "<%= bacula_client_secret %>" + Name = <%= @bacula_director_name %> + Password = "<%= @bacula_client_secret %>" TLS Enable = yes TLS Require = yes TLS Verify Peer = yes - TLS Allowed CN = "clientcerts/<%= bacula_director_address %>" - TLS CA Certificate File = "<%= bacula_ca_path %>" + TLS Allowed CN = "clientcerts/<%= @bacula_director_address %>" + TLS CA Certificate File = "<%= @bacula_ca_path %>" # This is a server certificate, used for incoming director connections. - TLS Certificate = "<%= bacula_ssl_server_cert %>" - TLS Key = "<%= bacula_ssl_server_key %>" + TLS Certificate = "<%= @bacula_ssl_server_cert %>" + TLS Key = "<%= @bacula_ssl_server_key %>" } # "Global" File daemon configuration specifications FileDaemon { - Name = <%= bacula_client_name %> - FDport = <%= bacula_client_port %> + Name = <%= @bacula_client_name %> + FDport = <%= @bacula_client_port %> WorkingDirectory = /var/lib/bacula Pid Directory = /var/run/bacula Maximum Concurrent Jobs = 20 - FDAddress = <%= fqdn %> + FDAddress = <%= @fqdn %> #Maximum Network Buffer Size = 524288 TLS Enable = yes TLS Require = yes - TLS CA Certificate File = "<%= bacula_ca_path %>" + TLS CA Certificate File = "<%= @bacula_ca_path %>" # This is a client certificate, used by the client to connect to the storage daemon - TLS Certificate = "<%= bacula_ssl_client_cert %>" - TLS Key = "<%= bacula_ssl_client_key %>" + TLS Certificate = "<%= @bacula_ssl_client_cert %>" + TLS Key = "<%= @bacula_ssl_client_key %>" <%- if scope.lookupvar('site::nodeinfo')['hoster']['name'] == "brown" -%> # broken firewall @@ -45,5 +45,5 @@ FileDaemon { # Send all messages except skipped files back to Director Messages { Name = Standard - director = <%=bacula_director_name%> = all, !skipped, !restored + director = <%= @bacula_director_name %> = all, !skipped, !restored } diff --git a/modules/bacula/templates/bacula-idle-restart.erb b/modules/bacula/templates/bacula-idle-restart.erb index a19101da9..a99ff8033 100644 --- a/modules/bacula/templates/bacula-idle-restart.erb +++ b/modules/bacula/templates/bacula-idle-restart.erb @@ -10,10 +10,10 @@ set -e if [ "$1" = "fd" ];then - PORT=<%= bacula_client_port %> + PORT=<%= @bacula_client_port %> DIR="bacula-fd" elif [ "$1" = "sd" ]; then - PORT=<%= bacula_storage_port %> + PORT=<%= @bacula_storage_port %> DIR="bacula-sd" else # Usage diff --git a/modules/debian-org/files/apt.conf.d/local-compression b/modules/debian_org/files/apt.conf.d/local-compression similarity index 100% rename from modules/debian-org/files/apt.conf.d/local-compression rename to modules/debian_org/files/apt.conf.d/local-compression diff --git a/modules/debian-org/files/apt.conf.d/local-langs b/modules/debian_org/files/apt.conf.d/local-langs similarity index 100% rename from modules/debian-org/files/apt.conf.d/local-langs rename to modules/debian_org/files/apt.conf.d/local-langs diff --git a/modules/debian-org/files/apt.conf.d/local-pdiffs b/modules/debian_org/files/apt.conf.d/local-pdiffs similarity index 100% rename from modules/debian-org/files/apt.conf.d/local-pdiffs rename to modules/debian_org/files/apt.conf.d/local-pdiffs diff --git a/modules/debian-org/files/apt.conf.d/local-recommends b/modules/debian_org/files/apt.conf.d/local-recommends similarity index 100% rename from modules/debian-org/files/apt.conf.d/local-recommends rename to modules/debian_org/files/apt.conf.d/local-recommends diff --git a/modules/debian-org/files/apt.preferences b/modules/debian_org/files/apt.preferences similarity index 100% rename from modules/debian-org/files/apt.preferences rename to modules/debian_org/files/apt.preferences diff --git a/modules/debian-org/files/basic-ssh_known_hosts b/modules/debian_org/files/basic-ssh_known_hosts similarity index 100% rename from modules/debian-org/files/basic-ssh_known_hosts rename to modules/debian_org/files/basic-ssh_known_hosts diff --git a/modules/debian-org/files/check_for_updates b/modules/debian_org/files/check_for_updates similarity index 100% rename from modules/debian-org/files/check_for_updates rename to modules/debian_org/files/check_for_updates diff --git a/modules/debian-org/files/db.debian.org.gpg b/modules/debian_org/files/db.debian.org.gpg similarity index 100% rename from modules/debian-org/files/db.debian.org.gpg rename to modules/debian_org/files/db.debian.org.gpg diff --git a/modules/debian-org/files/dsa-puppet-stuff.cron.ignore b/modules/debian_org/files/dsa-puppet-stuff.cron.ignore similarity index 100% rename from modules/debian-org/files/dsa-puppet-stuff.cron.ignore rename to modules/debian_org/files/dsa-puppet-stuff.cron.ignore diff --git a/modules/debian-org/files/etc.profile.d/timeout.sh b/modules/debian_org/files/etc.profile.d/timeout.sh similarity index 100% rename from modules/debian-org/files/etc.profile.d/timeout.sh rename to modules/debian_org/files/etc.profile.d/timeout.sh diff --git a/modules/debian-org/files/etc.zsh/zprofile b/modules/debian_org/files/etc.zsh/zprofile similarity index 100% rename from modules/debian-org/files/etc.zsh/zprofile rename to modules/debian_org/files/etc.zsh/zprofile diff --git a/modules/debian-org/files/molly-guard/10-check-kvm b/modules/debian_org/files/molly-guard/10-check-kvm similarity index 100% rename from modules/debian-org/files/molly-guard/10-check-kvm rename to modules/debian_org/files/molly-guard/10-check-kvm diff --git a/modules/debian-org/files/molly-guard/15-acquire-reboot-lock b/modules/debian_org/files/molly-guard/15-acquire-reboot-lock similarity index 100% rename from modules/debian-org/files/molly-guard/15-acquire-reboot-lock rename to modules/debian_org/files/molly-guard/15-acquire-reboot-lock diff --git a/modules/debian-org/files/nsswitch.conf b/modules/debian_org/files/nsswitch.conf similarity index 100% rename from modules/debian-org/files/nsswitch.conf rename to modules/debian_org/files/nsswitch.conf diff --git a/modules/debian-org/files/puppet.default b/modules/debian_org/files/puppet.default similarity index 100% rename from modules/debian-org/files/puppet.default rename to modules/debian_org/files/puppet.default diff --git a/modules/debian-org/files/root-dotfiles/bashrc b/modules/debian_org/files/root-dotfiles/bashrc similarity index 100% rename from modules/debian-org/files/root-dotfiles/bashrc rename to modules/debian_org/files/root-dotfiles/bashrc diff --git a/modules/debian-org/files/root-dotfiles/profile b/modules/debian_org/files/root-dotfiles/profile similarity index 100% rename from modules/debian-org/files/root-dotfiles/profile rename to modules/debian_org/files/root-dotfiles/profile diff --git a/modules/debian-org/files/root-dotfiles/screenrc b/modules/debian_org/files/root-dotfiles/screenrc similarity index 100% rename from modules/debian-org/files/root-dotfiles/screenrc rename to modules/debian_org/files/root-dotfiles/screenrc diff --git a/modules/debian-org/files/root-dotfiles/selected_editor b/modules/debian_org/files/root-dotfiles/selected_editor similarity index 100% rename from modules/debian-org/files/root-dotfiles/selected_editor rename to modules/debian_org/files/root-dotfiles/selected_editor diff --git a/modules/debian-org/files/root-dotfiles/tmux.conf b/modules/debian_org/files/root-dotfiles/tmux.conf similarity index 100% rename from modules/debian-org/files/root-dotfiles/tmux.conf rename to modules/debian_org/files/root-dotfiles/tmux.conf diff --git a/modules/debian-org/files/root-dotfiles/vimrc b/modules/debian_org/files/root-dotfiles/vimrc similarity index 100% rename from modules/debian-org/files/root-dotfiles/vimrc rename to modules/debian_org/files/root-dotfiles/vimrc diff --git a/modules/debian-org/files/timezone b/modules/debian_org/files/timezone similarity index 100% rename from modules/debian-org/files/timezone rename to modules/debian_org/files/timezone diff --git a/modules/debian-org/files/ud-replicated.service b/modules/debian_org/files/ud-replicated.service similarity index 100% rename from modules/debian-org/files/ud-replicated.service rename to modules/debian_org/files/ud-replicated.service diff --git a/modules/debian-org/lib/facter/architecture.rb b/modules/debian_org/lib/facter/architecture.rb similarity index 100% rename from modules/debian-org/lib/facter/architecture.rb rename to modules/debian_org/lib/facter/architecture.rb diff --git a/modules/debian-org/lib/facter/cluster.rb b/modules/debian_org/lib/facter/cluster.rb similarity index 100% rename from modules/debian-org/lib/facter/cluster.rb rename to modules/debian_org/lib/facter/cluster.rb diff --git a/modules/debian-org/lib/facter/debsso.rb b/modules/debian_org/lib/facter/debsso.rb similarity index 100% rename from modules/debian-org/lib/facter/debsso.rb rename to modules/debian_org/lib/facter/debsso.rb diff --git a/modules/debian-org/lib/facter/hosts.rb b/modules/debian_org/lib/facter/hosts.rb similarity index 97% rename from modules/debian-org/lib/facter/hosts.rb rename to modules/debian_org/lib/facter/hosts.rb index 63c04cb27..4c6cad75c 100644 --- a/modules/debian-org/lib/facter/hosts.rb +++ b/modules/debian_org/lib/facter/hosts.rb @@ -14,7 +14,7 @@ Facter.add("brokenhosts") do if brokenhosts true else - '' + false end end end diff --git a/modules/debian-org/lib/facter/ipaddresses.rb b/modules/debian_org/lib/facter/ipaddresses.rb similarity index 100% rename from modules/debian-org/lib/facter/ipaddresses.rb rename to modules/debian_org/lib/facter/ipaddresses.rb diff --git a/modules/debian-org/lib/facter/lsb-for-bsd.rb b/modules/debian_org/lib/facter/lsb-for-bsd.rb similarity index 100% rename from modules/debian-org/lib/facter/lsb-for-bsd.rb rename to modules/debian_org/lib/facter/lsb-for-bsd.rb diff --git a/modules/debian-org/lib/facter/mounts.rb b/modules/debian_org/lib/facter/mounts.rb similarity index 100% rename from modules/debian-org/lib/facter/mounts.rb rename to modules/debian_org/lib/facter/mounts.rb diff --git a/modules/debian-org/lib/facter/mta.rb b/modules/debian_org/lib/facter/mta.rb similarity index 100% rename from modules/debian-org/lib/facter/mta.rb rename to modules/debian_org/lib/facter/mta.rb diff --git a/modules/debian-org/lib/facter/onion-services.rb b/modules/debian_org/lib/facter/onion-services.rb similarity index 100% rename from modules/debian-org/lib/facter/onion-services.rb rename to modules/debian_org/lib/facter/onion-services.rb diff --git a/modules/debian-org/lib/facter/os-for-bsd.rb b/modules/debian_org/lib/facter/os-for-bsd.rb similarity index 100% rename from modules/debian-org/lib/facter/os-for-bsd.rb rename to modules/debian_org/lib/facter/os-for-bsd.rb diff --git a/modules/debian-org/lib/facter/paths.rb b/modules/debian_org/lib/facter/paths.rb similarity index 97% rename from modules/debian-org/lib/facter/paths.rb rename to modules/debian_org/lib/facter/paths.rb index 47a010ce8..ccc4588d8 100644 --- a/modules/debian-org/lib/facter/paths.rb +++ b/modules/debian_org/lib/facter/paths.rb @@ -13,7 +13,7 @@ if FileTest.exist?(path) true else - '' + false end end end diff --git a/modules/debian-org/lib/facter/raidarray.rb b/modules/debian_org/lib/facter/raidarray.rb similarity index 93% rename from modules/debian-org/lib/facter/raidarray.rb rename to modules/debian_org/lib/facter/raidarray.rb index 7dc29c3e8..5fc70e550 100644 --- a/modules/debian-org/lib/facter/raidarray.rb +++ b/modules/debian_org/lib/facter/raidarray.rb @@ -6,7 +6,7 @@ Facter.add("smartarraycontroller") do elsif FileTest.exist?("/sys/module/hpsa/") true else - '' + false end end end @@ -14,7 +14,7 @@ end Facter.add("ThreeWarecontroller") do confine :kernel => :linux setcode do - is3w = '' + is3w = false if FileTest.exist?("/proc/scsi/scsi") IO.foreach("/proc/scsi/scsi") { |x| is3w = true if x =~ /Vendor: 3ware/ @@ -30,7 +30,7 @@ Facter.add("megaraid") do if FileTest.exist?("/dev/megadev0") true else - '' + false end end end @@ -41,7 +41,7 @@ Facter.add("mptraid") do if FileTest.exist?("/dev/mptctl") or FileTest.exist?("/dev/mpt0") or FileTest.exist?("/proc/mpt/summary") true else - '' + false end end end @@ -52,7 +52,7 @@ Facter.add("aacraid") do if FileTest.exist?("/dev/aac0") true else - '' + false end end end @@ -60,7 +60,7 @@ end Facter.add("swraid") do confine :kernel => :linux setcode do - swraid = '' + swraid = false if FileTest.exist?("/proc/mdstat") && FileTest.exist?("/sbin/mdadm") IO.foreach("/proc/mdstat") { |x| swraid = true if x =~ /md[0-9]+ : active/ diff --git a/modules/debian-org/lib/facter/roleaccounts.rb b/modules/debian_org/lib/facter/roleaccounts.rb similarity index 95% rename from modules/debian-org/lib/facter/roleaccounts.rb rename to modules/debian_org/lib/facter/roleaccounts.rb index 221c376c8..d95dc0419 100644 --- a/modules/debian-org/lib/facter/roleaccounts.rb +++ b/modules/debian_org/lib/facter/roleaccounts.rb @@ -25,7 +25,7 @@ begin Facter.add("staticsync_user_exists") do setcode do - result = '' + result = false begin if Etc.getpwnam('staticsync') result = true @@ -50,7 +50,7 @@ begin Facter.add("weblogsync_user_exists") do setcode do - result = '' + result = false begin if Etc.getpwnam('weblogsync') result = true @@ -75,7 +75,7 @@ begin Facter.add("buildd_user_exists") do setcode do - result = '' + result = false begin if Etc.getpwnam('buildd') result = true @@ -99,7 +99,7 @@ begin Facter.add("portforwarder_user_exists") do setcode do - result = '' + result = false begin if Etc.getpwnam('portforwarder') result = true diff --git a/modules/debian-org/lib/facter/servertype.rb b/modules/debian_org/lib/facter/servertype.rb similarity index 89% rename from modules/debian-org/lib/facter/servertype.rb rename to modules/debian_org/lib/facter/servertype.rb index 85970c168..21dba00b6 100644 --- a/modules/debian-org/lib/facter/servertype.rb +++ b/modules/debian_org/lib/facter/servertype.rb @@ -1,6 +1,6 @@ Facter.add("kvmdomain") do setcode do - result = '' + result = false if File.new('/proc/cpuinfo').read().index('QEMU Virtual CPU') result = true end diff --git a/modules/debian-org/lib/facter/software.rb b/modules/debian_org/lib/facter/software.rb similarity index 95% rename from modules/debian-org/lib/facter/software.rb rename to modules/debian_org/lib/facter/software.rb index 0045a9ef0..5c079129b 100644 --- a/modules/debian-org/lib/facter/software.rb +++ b/modules/debian_org/lib/facter/software.rb @@ -3,7 +3,7 @@ Facter.add("apache2") do if FileTest.exist?("/usr/sbin/apache2") true else - '' + false end end end @@ -13,7 +13,7 @@ Facter.add("apache2deb9") do if FileTest.exist?("/usr/sbin/apache2") and system("dpkg --compare-versions $(dpkg-query -W -f='${Version}\n' apache2-bin) gt 2.4.15") true else - '' + false end end end @@ -22,7 +22,7 @@ Facter.add("clamd") do if FileTest.exist?("/usr/sbin/clamd") true else - '' + false end end end @@ -31,7 +31,7 @@ Facter.add("exim4") do if FileTest.exist?("/usr/sbin/exim4") true else - '' + false end end end @@ -40,7 +40,7 @@ Facter.add("postfix") do if FileTest.exist?("/usr/sbin/postfix") true else - '' + false end end end @@ -55,7 +55,7 @@ Facter.add("postgres") do if pg true else - '' + false end end end @@ -64,7 +64,7 @@ Facter.add("postgrey") do if FileTest.exist?("/usr/sbin/postgrey") true else - '' + false end end end @@ -78,7 +78,7 @@ Facter.add("policydweight") do if FileTest.exist?("/usr/sbin/policyd-weight") true else - '' + false end end end @@ -87,7 +87,7 @@ Facter.add("spamd") do if FileTest.exist?("/usr/sbin/spamd") true else - '' + false end end end @@ -100,7 +100,7 @@ Facter.add("php5") do if php true else - '' + false end end end @@ -111,7 +111,7 @@ Facter.add("php5suhosin") do if suhosin true else - '' + false end end end @@ -127,7 +127,7 @@ Facter.add("unbound") do if unbound true else - '' + false end end end @@ -141,7 +141,7 @@ Facter.add("samhain") do if FileTest.exist?("/usr/sbin/samhain") true else - '' + false end end end @@ -151,7 +151,7 @@ Facter.add("systemd") do if File.symlink?(init) and File.readlink(init) == "/lib/systemd/systemd" true else - '' + false end end end diff --git a/modules/debian-org/lib/facter/system-hw.rb b/modules/debian_org/lib/facter/system-hw.rb similarity index 95% rename from modules/debian-org/lib/facter/system-hw.rb rename to modules/debian_org/lib/facter/system-hw.rb index 0b36e5feb..262e8c518 100644 --- a/modules/debian-org/lib/facter/system-hw.rb +++ b/modules/debian_org/lib/facter/system-hw.rb @@ -4,7 +4,7 @@ Facter.add("systemproductname") do if FileTest.exist?("/usr/sbin/dmidecode") %x{/usr/sbin/dmidecode -s system-product-name}.chomp.strip else - '' + false end end end @@ -15,7 +15,7 @@ Facter.add("hw_can_temp_sensors") do if FileTest.exist?("/sys/devices/virtual/thermal/thermal_zone0/temp") true else - '' + false end end end diff --git a/modules/debian-org/manifests/apt.pp b/modules/debian_org/manifests/apt.pp similarity index 85% rename from modules/debian-org/manifests/apt.pp rename to modules/debian_org/manifests/apt.pp index 74aaa71c8..9fc02a0b2 100644 --- a/modules/debian-org/manifests/apt.pp +++ b/modules/debian_org/manifests/apt.pp @@ -1,9 +1,9 @@ -# == Class: debian-org +# == Class: debian_org # # Stuff common to all debian.org servers # -class debian-org::apt { - if $::lsbmajdistrelease <= 7 { +class debian_org::apt { + if $::lsbmajdistrelease <= '7' { $mungedcodename = $::lsbdistcodename } elsif ($::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) { $mungedcodename = "${::lsbdistcodename}-kfreebsd" @@ -11,7 +11,7 @@ class debian-org::apt { $mungedcodename = $::lsbdistcodename } - if $::lsbmajdistrelease <= 8 { + if $::lsbmajdistrelease <= '8' { $fallbackmirror = 'http://cdn-fastly.deb.debian.org/debian/' } else { $fallbackmirror = 'http://deb.debian.org/debian/' @@ -43,7 +43,7 @@ class debian-org::apt { url => 'http://db.debian.org/debian-admin', suite => $dbdosuites, components => 'main', - key => 'puppet:///modules/debian-org/db.debian.org.gpg', + key => 'puppet:///modules/debian_org/db.debian.org.gpg', } if ($::hostname in [] or $::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) { @@ -97,19 +97,19 @@ class debian-org::apt { } file { '/etc/apt/preferences': - source => 'puppet:///modules/debian-org/apt.preferences', + source => 'puppet:///modules/debian_org/apt.preferences', } file { '/etc/apt/apt.conf.d/local-compression': - source => 'puppet:///modules/debian-org/apt.conf.d/local-compression', + source => 'puppet:///modules/debian_org/apt.conf.d/local-compression', } file { '/etc/apt/apt.conf.d/local-recommends': - source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends', + source => 'puppet:///modules/debian_org/apt.conf.d/local-recommends', } file { '/etc/apt/apt.conf.d/local-pdiffs': - source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs', + source => 'puppet:///modules/debian_org/apt.conf.d/local-pdiffs', } file { '/etc/apt/apt.conf.d/local-langs': - source => 'puppet:///modules/debian-org/apt.conf.d/local-langs', + source => 'puppet:///modules/debian_org/apt.conf.d/local-langs', } exec { 'apt-get update': diff --git a/modules/debian-org/manifests/init.pp b/modules/debian_org/manifests/init.pp similarity index 78% rename from modules/debian-org/manifests/init.pp rename to modules/debian_org/manifests/init.pp index e8962c6df..6cb629efc 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian_org/manifests/init.pp @@ -1,9 +1,9 @@ -# == Class: debian-org +# == Class: debian_org # # Stuff common to all debian.org servers # -class debian-org { - include debian-org::apt +class debian_org { + include debian_org::apt if $systemd { include systemd @@ -40,10 +40,10 @@ class debian-org { ensure => present, replace => false, mode => '0644', - source => 'puppet:///modules/debian-org/basic-ssh_known_hosts' + source => 'puppet:///modules/debian_org/basic-ssh_known_hosts' } - if ($::lsbmajdistrelease >= 8) { + if ($::lsbmajdistrelease >= '8') { $rubyfs_package = 'ruby-filesystem' } else { $rubyfs_package = 'libfilesystem-ruby1.9' @@ -93,12 +93,12 @@ class debian-org { } file { '/etc/molly-guard/run.d/10-check-kvm': mode => '0755', - source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm', + source => 'puppet:///modules/debian_org/molly-guard/10-check-kvm', require => Package['molly-guard'], } file { '/etc/molly-guard/run.d/15-acquire-reboot-lock': mode => '0755', - source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock', + source => 'puppet:///modules/debian_org/molly-guard/15-acquire-reboot-lock', require => Package['molly-guard'], } @@ -124,10 +124,10 @@ class debian-org { ensure => directory, } file { '/etc/facter/facts.d/debian_facts.yaml': - content => template('debian-org/debian_facts.yaml.erb') + content => template('debian_org/debian_facts.yaml.erb') } file { '/etc/timezone': - source => 'puppet:///modules/debian-org/timezone', + source => 'puppet:///modules/debian_org/timezone', notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'], } if $::hostname == handel { @@ -135,12 +135,12 @@ class debian-org { $dbpassword = $puppetmaster::db::password } file { '/etc/puppet/puppet.conf': - content => template('debian-org/puppet.conf.erb'), + content => template('debian_org/puppet.conf.erb'), mode => 0440, group => 'puppet', } file { '/etc/default/puppet': - source => 'puppet:///modules/debian-org/puppet.default', + source => 'puppet:///modules/debian_org/puppet.default', } file { '/etc/systemd': ensure => directory, @@ -152,7 +152,7 @@ class debian-org { } file { '/etc/systemd/system/ud-replicated.service': ensure => $servicefiles, - source => 'puppet:///modules/debian-org/ud-replicated.service', + source => 'puppet:///modules/debian_org/ud-replicated.service', notify => Exec['systemctl daemon-reload'], } if $systemd { @@ -174,24 +174,24 @@ class debian-org { } file { '/etc/cron.d/dsa-puppet-stuff': - content => template('debian-org/dsa-puppet-stuff.cron.erb'), + content => template('debian_org/dsa-puppet-stuff.cron.erb'), require => Package['debian.org'], } file { '/etc/ldap/ldap.conf': require => Package['debian.org'], - content => template('debian-org/ldap.conf.erb'), + content => template('debian_org/ldap.conf.erb'), } file { '/etc/pam.d/common-session': require => Package['debian.org'], - content => template('debian-org/pam.common-session.erb'), + content => template('debian_org/pam.common-session.erb'), } file { '/etc/pam.d/common-session-noninteractive': require => Package['debian.org'], - content => template('debian-org/pam.common-session-noninteractive.erb'), + content => template('debian_org/pam.common-session-noninteractive.erb'), } file { '/etc/rc.local': mode => '0755', - content => template('debian-org/rc.local.erb'), + content => template('debian_org/rc.local.erb'), notify => Exec['service rc.local restart'], } file { '/etc/dsa': @@ -199,24 +199,24 @@ class debian-org { mode => '0755', } file { '/etc/dsa/cron.ignore.dsa-puppet-stuff': - source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore', + source => 'puppet:///modules/debian_org/dsa-puppet-stuff.cron.ignore', require => Package['debian.org'] } file { '/etc/nsswitch.conf': mode => '0755', - source => 'puppet:///modules/debian-org/nsswitch.conf', + source => 'puppet:///modules/debian_org/nsswitch.conf', } file { '/etc/profile.d/timeout.sh': mode => '0555', - source => 'puppet:///modules/debian-org/etc.profile.d/timeout.sh', + source => 'puppet:///modules/debian_org/etc.profile.d/timeout.sh', } file { '/etc/zsh': ensure => directory, } file { '/etc/zsh/zprofile': mode => '0444', - source => 'puppet:///modules/debian-org/etc.zsh/zprofile', + source => 'puppet:///modules/debian_org/etc.zsh/zprofile', } # set mmap_min_addr to 4096 to mitigate @@ -245,7 +245,7 @@ class debian-org { } file { '/usr/local/bin/check_for_updates': - source => 'puppet:///modules/debian-org/check_for_updates', + source => 'puppet:///modules/debian_org/check_for_updates', mode => '0755', owner => root, group => root, @@ -284,21 +284,21 @@ class debian-org { } file { '/root/.bashrc': - source => 'puppet:///modules/debian-org/root-dotfiles/bashrc', + source => 'puppet:///modules/debian_org/root-dotfiles/bashrc', } file { '/root/.profile': - source => 'puppet:///modules/debian-org/root-dotfiles/profile', + source => 'puppet:///modules/debian_org/root-dotfiles/profile', } file { '/root/.selected_editor': - source => 'puppet:///modules/debian-org/root-dotfiles/selected_editor', + source => 'puppet:///modules/debian_org/root-dotfiles/selected_editor', } file { '/root/.screenrc': - source => 'puppet:///modules/debian-org/root-dotfiles/screenrc', + source => 'puppet:///modules/debian_org/root-dotfiles/screenrc', } file { '/root/.tmux.conf': - source => 'puppet:///modules/debian-org/root-dotfiles/tmux.conf', + source => 'puppet:///modules/debian_org/root-dotfiles/tmux.conf', } file { '/root/.vimrc': - source => 'puppet:///modules/debian-org/root-dotfiles/vimrc', + source => 'puppet:///modules/debian_org/root-dotfiles/vimrc', } } diff --git a/modules/debian-org/manifests/radvd.pp b/modules/debian_org/manifests/radvd.pp similarity index 100% rename from modules/debian-org/manifests/radvd.pp rename to modules/debian_org/manifests/radvd.pp diff --git a/modules/debian-org/misc/hoster.yaml b/modules/debian_org/misc/hoster.yaml similarity index 100% rename from modules/debian-org/misc/hoster.yaml rename to modules/debian_org/misc/hoster.yaml diff --git a/modules/debian-org/misc/local.yaml b/modules/debian_org/misc/local.yaml similarity index 100% rename from modules/debian-org/misc/local.yaml rename to modules/debian_org/misc/local.yaml diff --git a/modules/debian-org/templates/debian_facts.yaml.erb b/modules/debian_org/templates/debian_facts.yaml.erb similarity index 100% rename from modules/debian-org/templates/debian_facts.yaml.erb rename to modules/debian_org/templates/debian_facts.yaml.erb diff --git a/modules/debian-org/templates/dsa-puppet-stuff.cron.erb b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb similarity index 100% rename from modules/debian-org/templates/dsa-puppet-stuff.cron.erb rename to modules/debian_org/templates/dsa-puppet-stuff.cron.erb diff --git a/modules/debian-org/templates/ldap.conf.erb b/modules/debian_org/templates/ldap.conf.erb similarity index 100% rename from modules/debian-org/templates/ldap.conf.erb rename to modules/debian_org/templates/ldap.conf.erb diff --git a/modules/debian-org/templates/pam.common-session-noninteractive.erb b/modules/debian_org/templates/pam.common-session-noninteractive.erb similarity index 100% rename from modules/debian-org/templates/pam.common-session-noninteractive.erb rename to modules/debian_org/templates/pam.common-session-noninteractive.erb diff --git a/modules/debian-org/templates/pam.common-session.erb b/modules/debian_org/templates/pam.common-session.erb similarity index 100% rename from modules/debian-org/templates/pam.common-session.erb rename to modules/debian_org/templates/pam.common-session.erb diff --git a/modules/debian-org/templates/puppet.conf.erb b/modules/debian_org/templates/puppet.conf.erb similarity index 92% rename from modules/debian-org/templates/puppet.conf.erb rename to modules/debian_org/templates/puppet.conf.erb index 8b7580026..4f6c659d6 100644 --- a/modules/debian-org/templates/puppet.conf.erb +++ b/modules/debian_org/templates/puppet.conf.erb @@ -42,3 +42,6 @@ modulepath=/srv/puppet.debian.org/stages/staging/modules:/srv/puppet.debian.org/ environments = development,testing,production,staging report = true configtimeout = 240 +<%- if has_variable?("puppetversion") and @puppetversion.to_s == "3.7.2" -%> +stringify_facts = false +<%- end -%> diff --git a/modules/debian-org/templates/rc.local.erb b/modules/debian_org/templates/rc.local.erb similarity index 96% rename from modules/debian-org/templates/rc.local.erb rename to modules/debian_org/templates/rc.local.erb index b3d13dc02..5667c3260 100755 --- a/modules/debian-org/templates/rc.local.erb +++ b/modules/debian_org/templates/rc.local.erb @@ -4,7 +4,7 @@ ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## -<%- if hostname == "zani" then -%> +<%- if @hostname == "zani" then -%> if [ -n "$(awk '$4 == "dasdb1" && $3 == "249999" {print}' /proc/partitions)" ]; then mkswap /dev/dasdb1 && swapon -p 30 /dev/dasdb1 fi diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index e5b051b25..ae732057f 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -54,7 +54,7 @@ class exim { } file { '/etc/exim4/ssl': ensure => directory, - group => Debian-exim, + group => 'Debian-exim', mode => '0750', purge => true, } @@ -110,28 +110,28 @@ class exim { } file { '/etc/exim4/ssl/thishost.crt': source => "puppet:///modules/exim/certs/${::fqdn}.crt", - group => Debian-exim, + group => 'Debian-exim', mode => '0640', } file { '/etc/exim4/ssl/thishost.key': source => "puppet:///modules/exim/certs/${::fqdn}.key", - group => Debian-exim, + group => 'Debian-exim', mode => '0640', } file { '/etc/exim4/ssl/ca.crt': source => 'puppet:///modules/exim/certs/ca.crt', - group => Debian-exim, + group => 'Debian-exim', mode => '0640', } file { '/etc/exim4/ssl/ca.crl': source => 'puppet:///modules/exim/certs/ca.crl', - group => Debian-exim, + group => 'Debian-exim', mode => '0640', } file { '/var/log/exim4': ensure => directory, mode => '2750', - owner => Debian-exim, + owner => 'Debian-exim', group => maillog, } diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index c3841ccac..93ec70865 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -211,7 +211,7 @@ queue_only_load = 8 <%- end -%> queue_list_requires_admin = false -<%- if has_variable?("clamd") && clamd == "true" -%> +<%- if has_variable?("clamd") && @clamd == "true" -%> av_scanner = clamd:/var/run/clamav/clamd.ctl <%- end -%> @@ -663,7 +663,7 @@ check_recipient: ratelimit = 10 / 60m / per_rcpt / $sender_host_address message = slow down (no reverse dns, mismatched ehlo, dialup, or in blacklists) -<%- if has_variable?("policydweight") && policydweight == "true" -%> +<%- if has_variable?("policydweight") && @policydweight == "true" -%> # Check with policyd-weight - this only works with a version after etch's, # sadly. etch's version attempts to hold the socket open, since that's what # postfix expects. Exim, on the other hand, expects the remote side to close @@ -734,7 +734,7 @@ check_recipient: <%- end -%> -<%- if has_variable?("greylistd") && greylistd == "true" -%> +<%- if has_variable?("greylistd") && @greylistd == "true" -%> defer message = $sender_host_address is not yet authorized to deliver mail from <$sender_address> to <$local_part@$domain>. log_message = greylisted. @@ -759,7 +759,7 @@ check_recipient: $local_part@$domain}\ {5s}{}{false}} -<%- elsif has_variable?("postgrey") && postgrey == "true" -%> +<%- elsif has_variable?("postgrey") && @postgrey == "true" -%> # next three are greylisting, inspired by http://www.bebt.de/blog/debian/archives/2006/07/30/T06_12_27/index.html # this adds acl_m_grey if there isn't one (so unique per message) warn @@ -956,7 +956,7 @@ check_message: condition = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}} message = Your mailer is not RFC 2047 compliant: message rejected -<%- if has_variable?("clamd") && clamd == "true" -%> +<%- if has_variable?("clamd") && @clamd == "true" -%> discard condition = ${if eq {$acl_m_prf}{blackhole}} demime = * malware = */defer_ok diff --git a/modules/exim/templates/mailname.erb b/modules/exim/templates/mailname.erb index c1b3ea33a..de5618b74 100644 --- a/modules/exim/templates/mailname.erb +++ b/modules/exim/templates/mailname.erb @@ -1 +1 @@ -<%= fqdn %> +<%= @fqdn %> diff --git a/modules/ferm/manifests/init.pp b/modules/ferm/manifests/init.pp index ae4ea19b2..869a3d660 100644 --- a/modules/ferm/manifests/init.pp +++ b/modules/ferm/manifests/init.pp @@ -16,7 +16,7 @@ class ferm { package { 'ferm': ensure => installed } - if ($::lsbmajdistrelease >= 8) { + if ($::lsbmajdistrelease >= '8') { package { 'ulogd2': ensure => installed } @@ -92,7 +92,7 @@ class ferm { content => template('ferm/interfaces.conf.erb'), notify => Service['ferm'], } - if ($::lsbmajdistrelease >= 8) { + if ($::lsbmajdistrelease >= '8') { augeas { 'logrotate_ulogd2': context => '/files/etc/logrotate.d/ulogd2', changes => [ diff --git a/modules/ferm/manifests/per-host.pp b/modules/ferm/manifests/per_host.pp similarity index 99% rename from modules/ferm/manifests/per-host.pp rename to modules/ferm/manifests/per_host.pp index 7db3c2dbd..8fd0d0757 100644 --- a/modules/ferm/manifests/per-host.pp +++ b/modules/ferm/manifests/per_host.pp @@ -1,4 +1,4 @@ -class ferm::per-host { +class ferm::per_host { if $::hostname in [zandonai,zelenka] { include ferm::zivit } diff --git a/modules/ferm/manifests/rule.pp b/modules/ferm/manifests/rule.pp index 939f926bb..f63d42167 100644 --- a/modules/ferm/manifests/rule.pp +++ b/modules/ferm/manifests/rule.pp @@ -14,7 +14,7 @@ define ferm::rule ( "/etc/ferm/dsa.d/${prio}_${name}": ensure => present, mode => '0400', - content => template('ferm/ferm-rule.erb'), + content => template('ferm/ferm_rule.erb'), notify => Service['ferm'], } } diff --git a/modules/ferm/templates/ferm-rule.erb b/modules/ferm/templates/ferm_rule.erb similarity index 58% rename from modules/ferm/templates/ferm-rule.erb rename to modules/ferm/templates/ferm_rule.erb index 235b8e329..ef674154b 100644 --- a/modules/ferm/templates/ferm-rule.erb +++ b/modules/ferm/templates/ferm_rule.erb @@ -3,10 +3,10 @@ ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## -domain <%= domain %> { - table <%= table %> { - chain <%= chain %> { - <%= rule %><% unless notarule -%>;<% end -%> +domain <%= @domain %> { + table <%= @table %> { + chain <%= @chain %> { + <%= @rule %><% unless @notarule -%>;<% end -%> } } diff --git a/modules/ferm/templates/me.conf.erb b/modules/ferm/templates/me.conf.erb index 72e65f422..627e4bfae 100644 --- a/modules/ferm/templates/me.conf.erb +++ b/modules/ferm/templates/me.conf.erb @@ -21,7 +21,7 @@ end ssh4allowed = [] ssh6allowed = [] -should_restrict = restrict_ssh.include?(hostname) +should_restrict = restrict_ssh.include?(@hostname) %w{dns_primary dns_geo}.each do |role_restrict| if scope.function_has_role([role_restrict]) then should_restrict = true @@ -29,16 +29,16 @@ should_restrict = restrict_ssh.include?(hostname) end -if restrict_ssh.include?(hostname) then +if restrict_ssh.include?(@hostname) then ssh4allowed << %w{$DSA_IPS $HOST_NAGIOS_V4 $HOST_MUNIN_V4 $HOST_DB_V4} ssh6allowed << %w{$DSA_V6_IPS $HOST_NAGIOS_V6 $HOST_MUNIN_V6 $HOST_DB_V6} - if %w{draghi}.include?(hostname) then + if %w{draghi}.include?(@hostname) then ssh4allowed << '$HOST_DEBIAN_V4' ssh6allowed << '$HOST_DEBIAN_V6' end - if %w{adayevskaya}.include?(hostname) then + if %w{adayevskaya}.include?(@hostname) then out << '@def $MFL_LOCAL = ( 130.83.226.60 );' # Michael Fladerer ssh4allowed << '$MFL_LOCAL' ssh4allowed << %w{$HOST_DEBIAN_V4} diff --git a/modules/hosts/templates/etc-hosts.erb b/modules/hosts/templates/etc-hosts.erb index 1105ac3ed..9448d0ea4 100644 --- a/modules/hosts/templates/etc-hosts.erb +++ b/modules/hosts/templates/etc-hosts.erb @@ -4,7 +4,7 @@ ## 127.0.0.1 localhost -<%= ipaddress %> <%= fqdn %> <%= hostname %> +<%= @ipaddress %> <%= @fqdn %> <%= @hostname %> # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback diff --git a/modules/linux/manifests/init.pp b/modules/linux/manifests/init.pp index 78ab1da77..e91ef2241 100644 --- a/modules/linux/manifests/init.pp +++ b/modules/linux/manifests/init.pp @@ -1,6 +1,6 @@ class linux { include ferm - include ferm::per-host + include ferm::per_host include entropykey - include rng-tools + include rng_tools } diff --git a/modules/monit/manifests/init.pp b/modules/monit/manifests/init.pp index 88055a109..977f1847c 100644 --- a/modules/monit/manifests/init.pp +++ b/modules/monit/manifests/init.pp @@ -7,7 +7,7 @@ # include monit # class monit { - if $::lsbmajdistrelease <= 7 { + if $::lsbmajdistrelease <= '7' { package { 'monit': ensure => installed } diff --git a/modules/motd/templates/motd.erb b/modules/motd/templates/motd.erb index 686f63019..f078a5f45 100644 --- a/modules/motd/templates/motd.erb +++ b/modules/motd/templates/motd.erb @@ -40,7 +40,7 @@ end ninfo = scope.lookupvar('site::nodeinfo') -extra = 'Welcome to ' + fqdn +extra = 'Welcome to ' + @fqdn if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose')) p = scope.lookupvar('site::nodeinfo')['ldap']['purpose'].clone() entries = "" @@ -84,7 +84,7 @@ end vms = [] scope.lookupvar('site::allnodeinfo').keys.sort.each do |node| - if scope.lookupvar('site::allnodeinfo')[node]['physicalHost'] and scope.lookupvar('site::allnodeinfo')[node]['physicalHost'].include?(fqdn) + if scope.lookupvar('site::allnodeinfo')[node]['physicalHost'] and scope.lookupvar('site::allnodeinfo')[node]['physicalHost'].include?(@fqdn) vms << node end end diff --git a/modules/munin/manifests/master-per-node.pp b/modules/munin/manifests/master_per_node.pp similarity index 60% rename from modules/munin/manifests/master-per-node.pp rename to modules/munin/manifests/master_per_node.pp index 1d8864e2a..cdb1dec0c 100644 --- a/modules/munin/manifests/master-per-node.pp +++ b/modules/munin/manifests/master_per_node.pp @@ -1,9 +1,9 @@ -define munin::master-per-node($ipaddress, $munin_async) { +define munin::master_per_node($ipaddress, $munin_async) { $client_fqdn = $name $client_ipaddress = $ipaddress $client_munin_async = $munin_async file { "/etc/munin/munin-conf.d/${name}.conf": - content => template('munin/munin.conf-per-node.erb'), + content => template('munin/munin.conf_per_node.erb'), } } diff --git a/modules/munin/templates/munin.conf-per-node.erb b/modules/munin/munin.conf_per_node.erb similarity index 100% rename from modules/munin/templates/munin.conf-per-node.erb rename to modules/munin/munin.conf_per_node.erb diff --git a/modules/munin/templates/munin-node.plugin.conf.erb b/modules/munin/templates/munin-node.plugin.conf.erb index 9aebf149d..872ac55c8 100644 --- a/modules/munin/templates/munin-node.plugin.conf.erb +++ b/modules/munin/templates/munin-node.plugin.conf.erb @@ -19,7 +19,7 @@ group adm, maillog user root <%= out = "" -if has_variable?("mta") and mta == "exim4" +if has_variable?("mta") and @mta == "exim4" out=" [exim_mail*] user Debian-exim @@ -63,7 +63,7 @@ env.critical 98 <%= out = "" -if has_variable?("mta") and mta == "postfix" +if has_variable?("mta") and @mta == "postfix" out=" [postfix_mailqueue] user postfix diff --git a/modules/nagios/templates/obsolete-packages-ignore.d-hostspecific.erb b/modules/nagios/templates/obsolete-packages-ignore.d-hostspecific.erb index f307ec6ef..8f815826f 100644 --- a/modules/nagios/templates/obsolete-packages-ignore.d-hostspecific.erb +++ b/modules/nagios/templates/obsolete-packages-ignore.d-hostspecific.erb @@ -5,7 +5,7 @@ <%= ignore = [] -case fqdn +case @fqdn when /draghi.debian.org/ then ignore << %w{userdir-ldap userdir-ldap-cgi libheimdal-kadm5-perl django-ldapdb ud python-cdb python-nameparser python-django-ldapdb} when "handel.debian.org" then ignore << %w{puppet-dashboard} when "reger.debian.org" then ignore << %w{librt-extension-commandbymail-perl} @@ -15,7 +15,7 @@ when /(storace|backuphost).debian.org/ then ignore << %w{post end if @lsbmajdistrelease <= '8' - case fqdn + case @fqdn when /(acker|aagaard).debian.org/ then ignore << %w{qemu-efi} end end diff --git a/modules/popcon/templates/popularity-contest.conf.erb b/modules/popcon/templates/popularity-contest.conf.erb index 14b2fb79b..6120c4183 100644 --- a/modules/popcon/templates/popularity-contest.conf.erb +++ b/modules/popcon/templates/popularity-contest.conf.erb @@ -7,10 +7,10 @@ PARTICIPATE="yes" USEHTTP="yes" <%= # hostids are 32 hexchars long -id_short = popcon_host_id[0,32] +id_short = @popcon_host_id[0,32] # slightly biased, but meh -day = (popcon_host_id[0].ord + 256*popcon_host_id[1].ord) % 7 +day = (@popcon_host_id[0].ord + 256*@popcon_host_id[1].ord) % 7 conf = [] conf << "MY_HOSTID=\"#{id_short}\"" diff --git a/modules/portforwarder/templates/authorized_keys.erb b/modules/portforwarder/templates/authorized_keys.erb index 063312a2f..ec11e54f6 100644 --- a/modules/portforwarder/templates/authorized_keys.erb +++ b/modules/portforwarder/templates/authorized_keys.erb @@ -30,7 +30,7 @@ config.each_pair do |sourcehost, services| ##lines << "# sourcehost is #{sourcehost}" services.each do |service| ##lines << "# targethost is #{service['target_host']}, my hostname #{hostname}, fqdn is #{fqdn}" - next if service['target_host'] != fqdn + next if service['target_host'] != @fqdn allowed_ports << service['target_port'] if service['target_port'] end diff --git a/modules/portforwarder/templates/xinetd.erb b/modules/portforwarder/templates/xinetd.erb index 7ff0dfb0d..93ba0aff3 100644 --- a/modules/portforwarder/templates/xinetd.erb +++ b/modules/portforwarder/templates/xinetd.erb @@ -25,7 +25,7 @@ template = 'service @@TARGET_HOST@@@@TARGET_PORT@@ ' config = YAML.load(File.open('/etc/puppet/modules/portforwarder/misc/config.yaml').read) -if config[fqdn] +if config[@fqdn] config[fqdn].each do |service| target_port = service['target_port'] target_host = service['target_host'] diff --git a/modules/puppetmaster/lib/puppet/parser/functions/entropy_provider.rb b/modules/puppetmaster/lib/puppet/parser/functions/entropy_provider.rb index e16290ce6..9f628cb60 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/entropy_provider.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/entropy_provider.rb @@ -22,7 +22,7 @@ module Puppet::Parser::Functions next unless localinfo[node]['entropy_key'] addresses = allnodeinfo[node]['ipHostNumber'] - thishoster = function_whohosts([addresses, "/etc/puppet/modules/debian-org/misc/hoster.yaml"]) + thishoster = function_whohosts([addresses, "/etc/puppet/modules/debian_org/misc/hoster.yaml"]) name = thishoster['name'] provider << node diff --git a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb index 71d5ee50e..1380a02ed 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb @@ -12,7 +12,7 @@ module Puppet::Parser::Functions unless nodeinfo['ldap']['ipHostNumber'] raise Puppet::ParseError, "Host #{host} does not have ipHostNumber values in ldap" end - nodeinfo['hoster'] = function_whohosts([nodeinfo['ldap']['ipHostNumber'], "/etc/puppet/modules/debian-org/misc/hoster.yaml"]) + nodeinfo['hoster'] = function_whohosts([nodeinfo['ldap']['ipHostNumber'], "/etc/puppet/modules/debian_org/misc/hoster.yaml"]) nodeinfo['buildd'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('buildd')) nodeinfo['timeserver'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('timeserver')) nodeinfo['porterbox'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('porterbox')) diff --git a/modules/resolv/templates/resolv.conf.erb b/modules/resolv/templates/resolv.conf.erb index dc2babed9..a42aa25d4 100644 --- a/modules/resolv/templates/resolv.conf.erb +++ b/modules/resolv/templates/resolv.conf.erb @@ -10,7 +10,7 @@ searchpaths << "debian.org" -%> search <%= searchpaths.to_a.flatten.join(" ") %> <% nameservers = [] -if %w{draghi}.include?(hostname) +if %w{draghi}.include?(@hostname) nameservers << "127.0.0.1" end nameservers += @ns diff --git a/modules/rng-tools/manifests/init.pp b/modules/rng_tools/manifests/init.pp similarity index 90% rename from modules/rng-tools/manifests/init.pp rename to modules/rng_tools/manifests/init.pp index abbc48622..c8bb9ab1e 100644 --- a/modules/rng-tools/manifests/init.pp +++ b/modules/rng_tools/manifests/init.pp @@ -1,4 +1,4 @@ -class rng-tools { +class rng_tools { if $has_dev_hwrng { package { 'rng-tools': ensure => installed diff --git a/modules/samhain/templates/samhainrc.erb b/modules/samhain/templates/samhainrc.erb index 72ee42a80..018a05ebe 100644 --- a/modules/samhain/templates/samhainrc.erb +++ b/modules/samhain/templates/samhainrc.erb @@ -180,7 +180,7 @@ file=/etc/ssh/userkeys file=/etc/ssh/userkeys/staticsync <% end -%> file=/etc/rsyncd -<%- if hostname == "sibelius" then -%> +<%- if @hostname == "sibelius" then -%> file=/etc/tsm file=/etc/tsm/TSM.PWD <% end -%> @@ -945,7 +945,7 @@ SetMailNum = 10 ## Recipient (max. 8) # -SetMailAddress=samhain-reports@<%= fqdn -%> +SetMailAddress=samhain-reports@<%= @fqdn -%> SetMailRelay = localhost diff --git a/modules/site/manifests/init.pp b/modules/site/manifests/init.pp index d40571417..19a64b5bf 100644 --- a/modules/site/manifests/init.pp +++ b/modules/site/manifests/init.pp @@ -1,7 +1,7 @@ class site { - $localinfo = yamlinfo('*', '/etc/puppet/modules/debian-org/misc/local.yaml') - $nodeinfo = nodeinfo($::fqdn, '/etc/puppet/modules/debian-org/misc/local.yaml') + $localinfo = yamlinfo('*', '/etc/puppet/modules/debian_org/misc/local.yaml') + $nodeinfo = nodeinfo($::fqdn, '/etc/puppet/modules/debian_org/misc/local.yaml') $allnodeinfo = allnodeinfo('sshRSAHostKey ipHostNumber', 'purpose mXRecord physicalHost purpose') $roles = hiera('roles') diff --git a/modules/site/manifests/sysctl.pp b/modules/site/manifests/sysctl.pp index e2d8f8816..b9e343479 100644 --- a/modules/site/manifests/sysctl.pp +++ b/modules/site/manifests/sysctl.pp @@ -1,4 +1,4 @@ -define site::sysctl ($key='', $value='', $target=Linux, $ensure = present) { +define site::sysctl ($key='', $value='', $target='Linux', $ensure = present) { include site case $ensure { present: { if ($key == "" or $value == "") { fail ( "Need to provide key and value" )} } diff --git a/modules/ssh/manifests/init.pp b/modules/ssh/manifests/init.pp index d86093ef3..fc576f82f 100644 --- a/modules/ssh/manifests/init.pp +++ b/modules/ssh/manifests/init.pp @@ -37,7 +37,7 @@ class ssh { content => template('ssh/authorized_keys.erb'), } - if ($::lsbmajdistrelease >= 8) { + if ($::lsbmajdistrelease >= '8') { if ! $has_etc_ssh_ssh_host_ed25519_key { exec { 'create-ed25519-host-key': command => 'ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -q -P "" -t ed25519', diff --git a/modules/ssh/templates/authorized_keys.erb b/modules/ssh/templates/authorized_keys.erb index 274654f26..ad126fa3e 100644 --- a/modules/ssh/templates/authorized_keys.erb +++ b/modules/ssh/templates/authorized_keys.erb @@ -4,7 +4,7 @@ %> # local admin -<%= localkeys = case fqdn +<%= localkeys = case @fqdn when "pettersson.debian.org" then "from=\"nixon.acc.umu.se\" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwDw56/XK0/uQB+ZIOZIfZ3vpz9zLRuv6G0U4eU4VavqvaL0dXSNhGJLBDLlfpxtJYwYf/mSoK4WZasbbfHxz8jtIxK9c9aGkVA0GKT+xiHWB3J1SlwJaA7S7Ed8nNcG5PNOVd30BD5LimkS53Nz841e+MgZRuL9SfLALq7er03U= root@nixon" end localkeys @@ -46,7 +46,7 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQDJp6ryOTW7VgqEa+n6uKpi/bh2PO4P9Z/voz0zPYtP <%= machine_keys = [] -case fqdn +case @fqdn when "storace.debian.org" then roles['dabackup_client'].each do |node| if allnodeinfo.has_key?(node) diff --git a/modules/ssh/templates/ssh_config.erb b/modules/ssh/templates/ssh_config.erb index ddd755605..e132a202b 100644 --- a/modules/ssh/templates/ssh_config.erb +++ b/modules/ssh/templates/ssh_config.erb @@ -54,7 +54,7 @@ Host * GSSAPIAuthentication no GSSAPIDelegateCredentials no VerifyHostKeyDNS yes -<%- if (hostname == "sibelius") -%> +<%- if (@hostname == "sibelius") -%> ServerAliveInterval 450 <%- end -%> # Used for the email-virtualdomains setup diff --git a/modules/ssh/templates/sshd_config.erb b/modules/ssh/templates/sshd_config.erb index 6330a27c4..7a8ff877c 100644 --- a/modules/ssh/templates/sshd_config.erb +++ b/modules/ssh/templates/sshd_config.erb @@ -8,7 +8,7 @@ # What ports, IPs and protocols we listen for Port 22 -<%= extraports = case fqdn +<%= extraports = case @fqdn when "paradis.debian.org" then " ListenAddress 0.0.0.0:22 ListenAddress [::]:22 @@ -24,7 +24,7 @@ extraports Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key -<%- if has_variable?("has_etc_ssh_ssh_host_ed25519_key") && has_etc_ssh_ssh_host_ed25519_key == "true" -%> +<%- if has_variable?("has_etc_ssh_ssh_host_ed25519_key") && @has_etc_ssh_ssh_host_ed25519_key == "true" -%> HostKey /etc/ssh/ssh_host_ed25519_key <% end %> #Privilege Separation is turned on for security diff --git a/modules/stunnel4/templates/stunnel.conf.erb b/modules/stunnel4/templates/stunnel.conf.erb index d2a3258ae..67cf7fd67 100644 --- a/modules/stunnel4/templates/stunnel.conf.erb +++ b/modules/stunnel4/templates/stunnel.conf.erb @@ -3,7 +3,7 @@ ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## -<%- if client -%> +<%- if @client -%> cert = /etc/ssl/debian/certs/thishost.crt key = /etc/ssl/private/thishost.key <%- else -%> @@ -16,11 +16,11 @@ chroot = /var/run/stunnel4 setuid = stunnel4 setgid = stunnel4 ; PID is created inside chroot jail -pid = /stunnel-<%= name %>.pid +pid = /stunnel-<%= @name %>.pid -verify = <%= verify %> -CAfile = <%= cafile %> -<%- if crlfile -%> +verify = <%= @verify %> +CAfile = <%= @cafile %> +<%- if @crlfile -%> CRLfile = /etc/exim4/ssl/ca.crl <%- end -%> @@ -29,16 +29,16 @@ debug = notice ; don't use a file, use syslog ; output = /var/log/stunnel4/stunnel.log -client = <%= client ? "yes" : "no" %> +client = <%= @client ? "yes" : "no" %> socket = a:SO_LINGER=1:60 socket = a:SO_KEEPALIVE=1 -[<%= name %>-server] -accept = <%= accept =~ /:/ ? accept : ":::#{accept}" %> -connect = <%= connect %> -<%- if local -%> -local = <%= local %> +[<%= @name %>-server] +accept = <%= @accept =~ /:/ ? @accept : ":::#{accept}" %> +connect = <%= @connect %> +<%- if @local -%> +local = <%= @local %> <%- end -%> ; vim:ft=dosini diff --git a/modules/syslog-ng/files/syslog-ng.default b/modules/syslog_ng/files/syslog-ng.default similarity index 100% rename from modules/syslog-ng/files/syslog-ng.default rename to modules/syslog_ng/files/syslog-ng.default diff --git a/modules/syslog-ng/files/syslog-ng.logrotate b/modules/syslog_ng/files/syslog-ng.logrotate similarity index 100% rename from modules/syslog-ng/files/syslog-ng.logrotate rename to modules/syslog_ng/files/syslog-ng.logrotate diff --git a/modules/syslog-ng/files/syslog-ng.logrotate.loggers b/modules/syslog_ng/files/syslog-ng.logrotate.loggers similarity index 100% rename from modules/syslog-ng/files/syslog-ng.logrotate.loggers rename to modules/syslog_ng/files/syslog-ng.logrotate.loggers diff --git a/modules/syslog-ng/files/syslog-ng.service b/modules/syslog_ng/files/syslog-ng.service similarity index 100% rename from modules/syslog-ng/files/syslog-ng.service rename to modules/syslog_ng/files/syslog-ng.service diff --git a/modules/syslog-ng/manifests/init.pp b/modules/syslog_ng/manifests/init.pp similarity index 73% rename from modules/syslog-ng/manifests/init.pp rename to modules/syslog_ng/manifests/init.pp index c55b6876b..a9b520673 100644 --- a/modules/syslog-ng/manifests/init.pp +++ b/modules/syslog_ng/manifests/init.pp @@ -1,4 +1,4 @@ -class syslog-ng { +class syslog_ng { package { 'syslog-ng': ensure => installed } @@ -10,22 +10,22 @@ class syslog-ng { } file { '/etc/syslog-ng/syslog-ng.conf': - content => template('syslog-ng/syslog-ng.conf.erb'), + content => template('syslog_ng/syslog-ng.conf.erb'), require => Package['syslog-ng'], notify => Service['syslog-ng'] } file { '/etc/default/syslog-ng': - source => 'puppet:///modules/syslog-ng/syslog-ng.default', + source => 'puppet:///modules/syslog_ng/syslog-ng.default', require => Package['syslog-ng'], notify => Service['syslog-ng'] } file { '/etc/logrotate.d/syslog-ng': - source => 'puppet:///modules/syslog-ng/syslog-ng.logrotate', + source => 'puppet:///modules/syslog_ng/syslog-ng.logrotate', require => Package['syslog-ng'] } if $::hostname in [lotty,lully,loghost-grnet-01] { file { '/etc/logrotate.d/syslog-ng-loggers': - source => 'puppet:///modules/syslog-ng/syslog-ng.logrotate.loggers', + source => 'puppet:///modules/syslog_ng/syslog-ng.logrotate.loggers', require => Package['syslog-ng'] } } @@ -34,7 +34,7 @@ class syslog-ng { if $systemd { file { '/etc/systemd/system/syslog-ng.service': ensure => $servicefiles, - source => 'puppet:///modules/syslog-ng/syslog-ng.service', + source => 'puppet:///modules/syslog_ng/syslog-ng.service', notify => Exec['systemctl daemon-reload'], } diff --git a/modules/syslog-ng/templates/syslog-ng.conf.erb b/modules/syslog_ng/templates/syslog-ng.conf.erb similarity index 95% rename from modules/syslog-ng/templates/syslog-ng.conf.erb rename to modules/syslog_ng/templates/syslog-ng.conf.erb index 551b7dbc5..d68fe0cdd 100644 --- a/modules/syslog-ng/templates/syslog-ng.conf.erb +++ b/modules/syslog_ng/templates/syslog-ng.conf.erb @@ -1,6 +1,6 @@ -<%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%> +<%- if has_variable?("syslogversion") and @syslogversion.to_s == "3.1" -%> @version: 3.0 -<%- elsif has_variable?("syslogversion") and syslogversion.to_s == "3.5" -%> +<%- elsif has_variable?("syslogversion") and @syslogversion.to_s == "3.5" -%> @version: 3.5 @include "scl.conf" <%- else -%> @@ -49,7 +49,7 @@ options { #sync(0); # the number of lines fitting in the output queue -<%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%> +<%- if has_variable?("syslogversion") and @syslogversion.to_s == "3.1" -%> log_fifo_size(2048); <%- else -%> log_fifo_size(10000); @@ -107,7 +107,7 @@ options { source s_local { # message generated by Syslog-NG internal(); -<%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%> +<%- if has_variable?("syslogversion") and @syslogversion.to_s == "3.1" -%> # standard Linux log source (this is the default place for the syslog() # function to send logs to) unix-stream("/dev/log"); @@ -118,7 +118,7 @@ source s_local { <%- end -%> }; -<%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%> +<%- if (@hostname == "lotti") || (@hostname == "lully") || (@hostname == "loghost-grnet-01") -%> source s_network { tcp6(port(5140) max-connections(400) tls( key_file("/etc/exim4/ssl/thishost.key") @@ -166,7 +166,7 @@ destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); }; destination df_debug { file("/var/log/debug"); }; destination df_messages { file("/var/log/messages"); }; -<%- if kernel == 'Linux' -%> +<%- if @kernel == 'Linux' -%> # pipes # a console to view log messages under X destination dp_xconsole { pipe("/dev/xconsole"); }; @@ -220,7 +220,7 @@ filter f_messages { # messages with priority emerg filter f_emerg { level(emerg); }; -<%- if kernel == 'Linux' -%> +<%- if @kernel == 'Linux' -%> # complex filter for messages usually sent to the xconsole filter f_xconsole { facility(daemon,mail) @@ -383,7 +383,7 @@ log { }; -<%- if kernel == 'Linux' -%> +<%- if @kernel == 'Linux' -%> # daemon.*;mail.*;\ # news.crit;news.err;news.notice;\ # *.=debug;*.=info;\ @@ -396,7 +396,7 @@ log { <%- end -%> - <%- if hostname != "lotti" -%> + <%- if @hostname != "lotti" -%> destination loghost-lotti { tcp("lotti.debian.org" port (5140) tls( key_file("/etc/ssl/private/thishost.key") @@ -406,7 +406,7 @@ destination loghost-lotti { ); }; <%- end -%> - <%- if hostname != "lully" -%> + <%- if @hostname != "lully" -%> destination loghost-lully { tcp("lully.debian.org" port (5140) tls( key_file("/etc/ssl/private/thishost.key") @@ -416,7 +416,7 @@ destination loghost-lully { ); }; <%- end -%> - <%- if hostname != "loghost-grnet-01" -%> + <%- if @hostname != "loghost-grnet-01" -%> destination loghost-loghost-grnet-01 { tcp("loghost-grnet-01.debian.org" port (5140) tls( key_file("/etc/ssl/private/thishost.key") @@ -429,20 +429,20 @@ destination loghost-loghost-grnet-01 { log { source(s_local); - <%- if hostname != "lotti" -%> + <%- if @hostname != "lotti" -%> destination(loghost-lotti); <%- end -%> - <%- if hostname != "lully" -%> + <%- if @hostname != "lully" -%> destination(loghost-lully); <%- end -%> - <%- if hostname != "loghost-grnet-01" -%> + <%- if @hostname != "loghost-grnet-01" -%> destination(loghost-loghost-grnet-01); <%- end -%> }; -<%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%> +<%- if (@hostname == "lotti") || (@hostname == "lully") || (@hostname == "loghost-grnet-01") -%> ############################################################################### ########## ON LOG HOST ######################################################## ############################################################################### -- 2.20.1