[Puppet Users] Hiera, define, class, putting all together

2016-06-04 Thread Helmut Schneider
Hi, I'm new to puppet and read docs as much as possible, so forgive some confusion in my code. ubuntu-common.yaml: --- packages: - bc - bsd-mailx - fail2ban - logrotate - open-vm-tools - openssh-server - rsyslog - rsync - sudo - snmpd apacheModules: - auth_kerb -

Re: [Puppet Users] Re: Hiera, define, class, putting all together

2016-06-07 Thread Helmut Schneider
jcbollinger wrote: > On Saturday, June 4, 2016 at 7:20:19 PM UTC-5, Helmut Schneider wrote: > > > > Hi, > > > > I'm new to puppet and read docs as much as possible, so forgive > > some confusion in my code. [Code] > Consider this call: > > hiera_

[Puppet Users] Issue copying files if package exists

2016-06-12 Thread Helmut Schneider
Hi, I want to copy files if a package is installed. What works fine with the packages 'postfix', 'fail2ban' and 'apache2' does not with 'openssh-server. class fail2ban { $postfixPackage = $::operatingsystem ? { /(?i:Ubuntu|Debian|Mint)/ => 'postfix', default =>

Re: [Puppet Users] Issue copying files if package exists

2016-06-12 Thread Helmut Schneider
Rob Nelson wrote: > Your code only shows one package, $package, being created, but it > does not show where the value for $package is set. Either that var The package block is missleading, it just installs fail2ban: $package = $::operatingsystem ? { /(?i:Ubuntu|Debian|Mint)/ =>

Re: [Puppet Users] Re: Hiera, define, class, putting all together

2016-06-10 Thread Helmut Schneider
jcbollinger wrote: > > On Tuesday, June 7, 2016 at 8:02:24 AM UTC-5, Helmut Schneider wrote: > > > > jcbollinger wrote: > > > > > Without the case statement, how can I make sure that ubuntu only > > receives classes for ubuntu and not e.g. for Wind

[Puppet Users] puppetlabs/apache: override variable

2016-06-13 Thread Helmut Schneider
Hi, apache/manifests/init.pp defines: if $::apache::conf_dir and $::apache::params::conf_file { case $::osfamily { 'debian': { $error_log= 'error.log' $scriptalias = '/usr/lib/cgi-bin' $access_log_file = 'access.log' } I would

Re: [Puppet Users] Issue copying files if package exists

2016-06-13 Thread Helmut Schneider
Craig Dunn wrote: > Given the above, what are you trying to achieve? Are you trying to > manage the file resource after the package resource, or are you > saying you only want to manage the file if the package exists on the > target system? The latter. If openssh-server is installed, copy the

Re: [Puppet Users] Issue copying files if package exists

2016-06-17 Thread Helmut Schneider
Rob Nelson wrote: > Modeling state can be tricky. It's pretty easy for a human to > understand conditionals like "If a package is installed, install a > file," but for state modeling, resources are best defined as either > managed or unmanaged, not somewhere in between. It's important to > keep

[Puppet Users] change order of elements

2016-06-19 Thread Helmut Schneider
Hi, Given the following structure: hiera.yaml: [...] :hierarchy: - nodes/%{::fqdn} [...] - common :merge_behavior: deeper common.yaml: [...] profiles: webserver: apache: modules: - auth_kerb - authnz_ldap - cgid - status host.yaml: profiles:

Re: [Puppet Users] change order of elements

2016-06-20 Thread Helmut Schneider
Peter Kristolaitis wrote: > > How can I ensure that mpm_* is always the first element in the > > array? > > Assuming you're trying to solve the problem I think you're trying to > solve (i.e. to have Apache with the correct process model installed > before any additional modules), it's important

[Puppet Users] Hiera and nested / reuse variables

2018-06-21 Thread Helmut Schneider
Hi, common.yaml: profiles: mailserver: postfix: instances: postfix-in: instance_path: '/etc/postfix-in' other_path:"%{instance_path}" <= required Is it possible to nest both variables somehow? Or alternatively from common.pp: $instance_path =

Re: [Puppet Users] Re: Format text in epp

2018-08-02 Thread Helmut Schneider
jcbollinger wrote: > On Wednesday, August 1, 2018 at 5:05:32 AM UTC-5, Helmut Schneider > wrote: > > > > Hi, > > > > is there a way to format text in epp? Something like > > > > a 100 > > abc20 > > defgds 30 >

[Puppet Users] Format text in epp

2018-08-01 Thread Helmut Schneider
Hi, is there a way to format text in epp? Something like a 100 abc20 defgds 30 Thank you! <%- | Hash $postfixTransport | -%> # This file is managed by Puppet, don't edit it by hand. # All changes will be overwritten! <% if ($postfixTransport) { -%> <% $postfixTransport.each |$domain,

[Puppet Users] Issue with lookup / hiera in yaml

2018-08-15 Thread Helmut Schneider
Hi, common.yaml: variable: baculaWorkingDirectory: '/var/lib/bacula' variables: baculaWorkingDirectory: '/var/lib/bacula' config.pp: [...] $variables = lookup({ "name" => "variables", "merge" => { "strategy" => "deep", "knockout_prefix" => "--", #

Re: [Puppet Users] Include Hiera Classes

2018-08-15 Thread Helmut Schneider
Jo Rhett wrote: > Well the exact answer to your question is: > > lookup("roles::${category}::${class}::classes", Array, > 'unique').include() > > However, the code you've shown is implementing a hierarchy for class > assignment duplicative of the Hiera hierarchy. Why not use Hiera's > hierarchy

Re: [Puppet Users] Issue with lookup / hiera in yaml

2018-08-16 Thread Helmut Schneider
Helmut Schneider wrote: > common.yaml: > variable: > baculaWorkingDirectory: '/var/lib/bacula' > > variables: > baculaWorkingDirectory: '/var/lib/bacula' > > config.pp: > [...] > $variables = lookup({ > "name" => "variabl

Re: [Puppet Users] Issue with lookup / hiera in yaml

2018-08-16 Thread Helmut Schneider
Henrik Lindberg wrote: > If your data looks like this: > > >> variables: > >>baculaWorkingDirectory: '/var/lib/bacula' > > Then you do not have a variables.debug key - you can lookup > variables, or variables.baculaWorkingDirectory common.yaml: --- netconfig: variables: debug:

Re: [Puppet Users] Issue with lookup / hiera in yaml

2018-08-16 Thread Helmut Schneider
Henrik Lindberg wrote: > You cannot give arguments to lookup as an interpolation function > inside of data. Use the commented out variant. Then use > lookup_options (in your data) to configure that lookup of 'variables' > should always be a 'deep' merge. Great, works now, thanks a lot! -- You

[Puppet Users] Include Hiera Classes

2018-08-06 Thread Helmut Schneider
Hi, I want to include hiera classes. --- roles::webserver::apache::classes: - my_apache roles::backup::bacula::classes: - bacula roles::timeserver::ntpd::classes: - ntpd roles::databaseserver::mysql::classes: - mysqld I used to use the follwoing (ugly) code in nodes.pp to do so: if

[Puppet Users] is_numeric

2018-08-06 Thread Helmut Schneider
Hi, I want to check if a variable is numeric. The manpage says is_numeric is deprectaed and I shall user validate_legacy. But <% if validate_legacy(Numeric, 'validate_numeric', $subsetting) { -%> Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation

Re: [Puppet Users] epp: has_key

2018-07-20 Thread Helmut Schneider
R.I. Pienaar wrote: > > > On 19 Jul 2018, at 21:19, Henrik Lindberg > > wrote: > > > >> On 2018-07-19 17:15, Helmut Schneider wrote: > >> Hi, > >> --- > >> profiles: > >> vpn: > >> openvpn: >

Re: [Puppet Users] undef / nil / empty in template

2018-07-15 Thread Helmut Schneider
Henrik Lindberg wrote: > On 2018-07-14 13:47, Johan Fleury wrote: > > I meant bool2str, sorry. > > > > https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/README.md#bool2str > > > > Helmut, before digging yourself deeper into problems by using work > around on top of problems - do

Re: [Puppet Users] undef / nil / empty in template

2018-07-16 Thread Helmut Schneider
Henrik Lindberg wrote: > On 2018-07-15 15:45, Helmut Schneider wrote: > > <%- | Hash $openvpnConf, > > It is important that there is no text before the opening <%- > Not sure if you have a blank line there. If so you will get a syntax > error because of the text ou

Re: [Puppet Users] undef / nil / empty in template

2018-07-16 Thread Helmut Schneider
Henrik Lindberg wrote: > On 2018-07-16 10:21, Helmut Schneider wrote: > > How can I fix this? > > > > It is a bug, please file a ticket in puppet's Jira for project PUP. https://tickets.puppetlabs.com/browse/PUP-9005 Thank you! -- You received this message becau

[Puppet Users] epp: has_key

2018-07-19 Thread Helmut Schneider
Hi, --- profiles: vpn: openvpn: defaults: client: dev: 'tun' proto: 'udp' resolv-retry: 'infinite' nobind: user: 'nobody' group: 'nogroup' persist-key:

[Puppet Users] Check existence of a hierarchy

2018-07-11 Thread Helmut Schneider
Hello all, let's assume the following structure in a yaml: profiles: vpn: openvpn: instances: client: myclient: remote: 'openvpn_host 1194' I would now like to check if e.g. "client" exists: if

Re: [Puppet Users] Check existence of a hierarchy

2018-07-11 Thread Helmut Schneider
Ben Ford wrote: > What you're looking for is the dig() function. > https://puppet.com/docs/puppet/latest/function.html#dig > > $profiles.dig('vpn', 'openvpn', 'instances', 'client') > > On Wed, Jul 11, 2018 at 8:32 AM Helmut Schneider > wrote: > > > He

Re: [Puppet Users] Hiera and nested / reuse variables

2018-07-13 Thread Helmut Schneider
Angel L. Mateo wrote: > El 21/06/18 a las 14:32, Helmut Schneider escribió: > > Hi, > > > > common.yaml: > > > > profiles: > >mailserver: > > postfix: > >instances: > > postfix-in: > >

[Puppet Users] undef / nil / empty in template

2018-07-13 Thread Helmut Schneider
Hi, openvpn.yaml: [...] profiles: vpn: openvpn: defaults: client: dev: 'tun' proto: 'udp' resolv-retry: 'infinite' nobind: user: 'nobody' group: 'nogroup'

Re: [Puppet Users] undef / nil / empty in template

2018-07-13 Thread Helmut Schneider
Christopher Wood wrote: > Have you considered switching to an EPP template? You can limit the > data passed in to only valid types (otherwise catalog compilation > failure), it's quite useful. Not yet. And I'm not sure if that will help. In my case there are commands with and without parameters:

Re: [Puppet Users] undef / nil / empty in template

2018-07-13 Thread Helmut Schneider
Christopher Wood wrote: > Nice catch, wouldn't have figured on that. You gave the hint with "if value.is_a? String" ;) And now? Is that expected? What can I do, "if @openvpnConf[parameter].is_a? Symbol"?! And what is a symbol and how do I check if it empty? Even more questionmark now... --

Re: [Puppet Users] undef / nil / empty in template

2018-07-13 Thread Helmut Schneider
Christopher Wood wrote: > On Fri, Jul 13, 2018 at 03:44:04PM +0000, Helmut Schneider wrote: > > Christopher Wood wrote: > > > > > Have you considered switching to an EPP template? You can limit > > > the data passed in to only valid types (otherwise catalog >

Re: [Puppet Users] undef / nil / empty in template

2018-07-13 Thread Helmut Schneider
Henrik Lindberg wrote: > On 2018-07-13 19:39, Helmut Schneider wrote: > > Christopher Wood wrote: > > > > > Nice catch, wouldn't have figured on that. > > > > You gave the hint with "if value.is_a? String" ;) > > > > And now? Is th

[Puppet Users] exec and variables

2018-12-20 Thread Helmut Schneider
Hi, I want to exec something with a variable. If found the following link and tried to implement: https://stackoverflow.com/questions/33557093/puppet-notify-a-class-with-parameters file { "${apacheConfPath}/conf-available/${file}": mode => '0640', owner => $rootUID,

Re: [Puppet Users] exec and variables

2018-12-21 Thread Helmut Schneider
Ben Ford wrote: > Sure. When you make a reference (the upper case File syntax), it has > to point to a thing that exists. The reference is a resource type > (File) and a resource title (99-status.conf), but you've not defined > a resource with that title. Basically, it's like making a symlink to

[Puppet Users] resolve hostname via custom fact

2018-12-23 Thread Helmut Schneider
Hi, I want to resolve a hostname via a custom fact: require "resolv" Facter.add("puppet_master_ip") do setcode do Resolv::DNS.open(:nameserver => ['8.8.8.8']) do |dns| ip = dns.getaddresses("www.puppet.org") end end end How do I get the output? I just want to get the first

Re: [Puppet Users] resolve hostname via custom fact

2018-12-24 Thread Helmut Schneider
Ben Ford wrote: > > I want to resolve a hostname via a custom fact: > > require "resolv" > > Facter.add("puppet_master_ip") do > > setcode do > > Resolv::DNS.open(:nameserver => ['8.8.8.8']) do |dns| > > ip = dns.getaddresses("www.puppet.org") > > end > > end > > end > > How do

[Puppet Users] [augeas] edit YAML file

2019-02-07 Thread Helmut Schneider
Hi, I want to edit a YAML file: network: version: 2 renderer: networkd ethernets: eth0: dhcp4: yes dhcp6: yes Id like to add a line: network: version: 2 renderer: networkd ethernets: eth0: dhcp4: yes dhcp6: yes dhcp-identifier: mac How can I

Re: [Puppet Users] knockout_prefix

2019-02-08 Thread Helmut Schneider
Helmut Schneider wrote: > hiera.conf: > :hierarchy: > - nodes/%{::fqdn} > - apps/apache > - common > > apache.yaml: > --- > lookup_options: > variables: > merge: > strategy:"deep" > knockout_prefix: &qu

[Puppet Users] knockout_prefix

2019-02-08 Thread Helmut Schneider
Hi, hiera.conf: :hierarchy: - nodes/%{::fqdn} - apps/apache - common apache.yaml: --- lookup_options: variables: merge: strategy:"deep" knockout_prefix: "--" [...] profiles: webserver: apache: server: configfiles: enable:

Re: [Puppet Users] [augeas] edit YAML file

2019-02-09 Thread Helmut Schneider
Ben Ford wrote: > The https://forge.puppet.com/fiddyspence/hash_file module makes it > very easy to manage yaml files. Will check. Thank you. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving

[Puppet Users] facter to return version of an installed package

2019-05-14 Thread Helmut Schneider
Hi, before I reinvent the wheel: Does anyone know a custom fact that returns the version of an installed package (if it is installed)? I assume it would be something like Facter.add(:package_version) do setcode do osfamily = Facter.value(:osfamily) case osfamily when

Re: [Puppet Users] facter to return version of an installed package

2019-05-20 Thread Helmut Schneider
jcbollinger wrote: > On Thursday, May 16, 2019 at 10:50:45 AM UTC-5, Helmut Schneider > wrote: > > > I don't want to install netplan but if it exists do the needful: > > I reiterate Ben Ford's comments: This is generally considered an > anti-pattern. > > It is

Re: [Puppet Users] facter to return version of an installed package

2019-05-16 Thread Helmut Schneider
Chris Taylor wrote: > if $operatingsystem == "Ubuntu" { > if versioncmp($facts['os']['release']['full'], '18') >= 0 { > package { 'netplan': > ensure => present, > } > file { "/etc/netplan/windows-dhcp.yaml": > mode=> '0644', > owner => "${rootUID}", >

Re: [Puppet Users] facter to return version of an installed package

2019-05-15 Thread Helmut Schneider
Ben Ford wrote: > To be sure, this pattern doesn't always work and you don't always have > control over the full system. What's your use case that you're trying > to solve? if $operatingsystem == "Ubuntu" { if versioncmp($facts['os']['release']['full'], '18') >= 0 { file {

[Puppet Users] change from 'notrun' to ['0'] failed

2019-08-30 Thread Helmut Schneider
Hi, I want to copy a file if a diff fails: exec { "Private key '${letsencryptConfPath}/live/${letsencryptCommonName}/privkey.pem' changed, updating": path=> '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin', command => "$copyPrivateCommand", unless => "diff -q

Re: [Puppet Users] change from 'notrun' to ['0'] failed

2019-09-01 Thread Helmut Schneider
Bart-Jan Vrielink wrote: > I cannot fully understand what you are trying to do, as I do not know > what $copyPrivateCommand is, but I would advice against using an exec > for copying a file, but just use a file resource instead: $copyPrivateKeyCommand = "cp -L

Re: [Puppet Users] change from 'notrun' to ['0'] failed

2019-09-02 Thread Helmut Schneider
Bart-Jan Vrielink wrote: > file { > "${letsencryptConfPath}/live/${letsencryptCommonName}/privkey.pem": >   ensure => file,   source => > "${appEtcConfPath}/ssl/private/${letsencryptCommonName}.letsencrypt.${ > letsencryptKeySize}.key",   notify => Exec['/usr/local/bin/apache.sh > -c restart'],  

Re: [Puppet Users] Using bash for custom facts - results are strings, not booleans

2019-07-23 Thread Helmut Schneider
'Prentice Bisbal' via Puppet Users wrote: > I'm trying to use bash to create custom facts that are booleans, > Unfortunately, when I do, the values are interpreted as strings, and > not booleans. For example, here is my bash script, gdm.sh: > > #!/bin/bash > >

[Puppet Users] Order in notify

2019-07-25 Thread Helmut Schneider
Hi, can I order Execs in a notify? exec { "Request $quality certificate for $letsencryptCommonName (SAN: ${join(sort($letsencryptDnsNames), ',')})": path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin', onlyif => "$requestOnlyif", command =>

[Puppet Users] [EPP] Using tagged, defined, a better way to create variables, ... to verify if a class is included

2019-07-22 Thread Helmut Schneider
Hi, I hope I can descripe the challenge. /etc/puppetlabs/code/environments/production/manifests/nodes.pp: node default { include common } /etc/puppetlabs/code/modules/common/manifests/init.pp: class common inherits config { include $classes [...]

Re: [Puppet Users] [EPP] Using tagged, defined, a better way to create variables, ... to verify if a class is included

2019-07-22 Thread Helmut Schneider
Christopher Wood wrote: > Top post, I'm not skilled enough to read this hence not sure where I'd > interject. You may be better off using simpler constructs so that > people with a wider variety of skill levels in your organization can > contribute. > > What problems are you encountering where

[Puppet Users] Augeas and SSH

2019-09-24 Thread Helmut Schneider
Hi, I want to set some values in sshd_config. Example: KexAlgorithms curve25519-sha...@libssh.org,diffie-hellman-group-exchange-sha256 keys($sshdCfg).each |String $comment| { augeas { "$file: $comment": context => $sshdCfg[$comment]['context'], changes => [

Re: [Puppet Users] Knocking out values

2020-03-10 Thread Helmut Schneider
Am 09.03.2020 um 18:36 schrieb Henrik Lindberg: On 2020-03-07 17:53, Helmut Schneider wrote: Why isn't mpm_event being removed? You are running into this: https://tickets.puppetlabs.com/browse/PUP-7428 What is the preferred way to handle this? Should one write his/her own code? -- You

[Puppet Users] Knocking out values

2020-03-07 Thread Helmut Schneider
Hi, using Puppet 5.5 and Hiera 3.4.6: common.yaml: profiles: webserver: apache: server: modules: enable: - mpm_event - status host.yaml: profiles: webserver: apache: server: modules: enable: -

[Puppet Users] Nested interpolation

2020-03-13 Thread Helmut Schneider
Hi, I'm using something like this: netconfig: hostname:'BSDHelmut' interfaces: "%{facts.networking.primary}": ip4: '192.168.124.35' cidr4: '192.168.124.35/24' ip4aliases: - '192.168.124.36/32' ip6: 'DHCP'

[Puppet Users] Access variable defined in each {}

2020-03-19 Thread Helmut Schneider
Hi, class abc { keys($netconfig['interfaces']).each |String $interface| { if $netconfig['interfaces'][$interface]['ip6'] { $myvariable = 'yes' break() } } if $myvariable == 'yes' { do something } } How can I access $myvariable? Thank you! -- You received this

Re: [Puppet Users] Access variable defined in each {}

2020-03-20 Thread Helmut Schneider
Am 19.03.2020 um 22:54 schrieb Henrik Lindberg: On 2020-03-19 22:11, Helmut Schneider wrote: Hi, class abc {   keys($netconfig['interfaces']).each |String $interface| {     if $netconfig['interfaces'][$interface]['ip6'] {   $myvariable = 'yes'   break

Re: [Puppet Users] Knocking out values

2020-03-09 Thread Helmut Schneider
Am 09.03.2020 um 16:48 schrieb Becca Robinson: What version of Puppet? helmut@h2786452:~$ puppet -V 5.5.18 helmut@h2786452:~$ hiera -V 3.4.6 helmut@h2786452:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 18.04.4 LTS Release:18.04 Codename:

Re: [Puppet Users] Knocking out values

2020-03-09 Thread Helmut Schneider
Am 07.03.2020 um 19:00 schrieb Becca Robinson: I just ran through some testing and try putting single quotes around your --mpm_event in Hiera. host.yaml: profiles:  webserver:    apache:  server:    modules:  enable:    - headers    - include    

Re: [Puppet Users] Knocking out values

2020-03-09 Thread Helmut Schneider
Am 07.03.2020 um 19:00 schrieb Becca Robinson: I just ran through some testing and try putting single quotes around your --mpm_event in Hiera. host.yaml: profiles:  webserver:    apache:  server:    modules:  enable:    - headers    - include    

[Puppet Users] Duplicate declaration: Exec

2020-09-01 Thread Helmut Schneider
Hi, /etc/puppetlabs/code/modules/amavisd/manifests/init.pp ensure_resource('exec', '/usr/local/bin/amavisd.sh -sP', { path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin', refreshonly => true, command => 'su -l root -c "/usr/local/bin/amavisd.sh -sP"', }) One client reports: Server

Re: [Puppet Users] inlined-epp with hash

2020-09-10 Thread Helmut Schneider
Am 10.09.2020 um 08:10 schrieb Andreas Dvorak: epp file <%- | Hash database_conf, | -%> Hash $databse_conf -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[Puppet Users] [augeas] ins before / after

2020-07-09 Thread Helmut Schneider
Hi, I want to put values ordered in (here) sshd_config. I tried with ins...after but get only errors: 'sshd_config PrintMotd': context: '/files/etc/ssh/sshd_config' changes: - 'set PrintMotd yes' 'sshd_config PasswordAuthentication': context: '/files/etc/ssh/sshd_config' changes:

[Puppet Users] if ($variable) after upgrade from 5.5 to 6

2020-06-17 Thread Helmut Schneider
Hi, helmut@puppet:~$ sudo puppet lookup --node mynode roles helmut@puppet:~$ Good because does not exist. class common inherits config { include $classes if ($roles) { keys($roles).each |String $role| { <== line9 [...] Error: Could not retrieve catalog from remote server: Error 500 on

Re: [Puppet Users] if ($variable) after upgrade from 5.5 to 6

2020-06-17 Thread Helmut Schneider
Am 17.06.2020 um 13:10 schrieb Helmut Schneider: helmut@puppet:~$ sudo puppet lookup --node mynode roles helmut@puppet:~$ Good because does not exist. class common inherits config { include $classes if ($roles) { keys($roles).each |String $role| { <== line9 [...] Error: Co

Re: [Puppet Users] if ($variable) after upgrade from 5.5 to 6

2020-06-19 Thread Helmut Schneider
Am 17.06.2020 um 15:01 schrieb 'Dirk Heinrichs' via Puppet Users: Am Mittwoch, den 17.06.2020, 13:37 +0200 schrieb Helmut Schneider: Can I check if  an array has elements? if size($something) > 0 {} Found $array.empty but thank you. -- You received this message because you are subscri

Re: [Puppet Users] Puppet Reports

2020-11-27 Thread Helmut Schneider
Am 26.11.2020 um 12:04 schrieb 'Dirk Heinrichs' via Puppet Users: Am Donnerstag, den 26.11.2020, 11:46 +0100 schrieb Helmut Schneider: Am 26.11.2020 um 10:19 schrieb 'Dirk Heinrichs' via Puppet Users: Am Donnerstag, den 26.11.2020, 09:37 +0100 schrieb Helmut Schneider: Can I remove "

[Puppet Users] Puppet Reports

2020-11-26 Thread Helmut Schneider
Hi, as /opt/puppetlabs/server/data/puppetserver/reports/ is filling up, what are those reports used for? I read that I can purge them but want to understand the purpose of those reports before doing so. I use puppetdb if that is important. Thank you! -- You received this message because

Re: [Puppet Users] Puppet Reports

2020-11-26 Thread Helmut Schneider
Am 26.11.2020 um 10:19 schrieb 'Dirk Heinrichs' via Puppet Users: Am Donnerstag, den 26.11.2020, 09:37 +0100 schrieb Helmut Schneider: as /opt/puppetlabs/server/data/puppetserver/reports/ is filling up, what are those reports used for? Errh, for checking what's going on in your environment

[Puppet Users] Could not retrieve local facts: can't create Thread: Resource temporarily unavailable

2020-12-08 Thread Helmut Schneider
Hi, after update of puppet-agent on Ubuntu I get the following error: Debug: Facter: Query is operatingsystem Debug: Facter: Checking query tokens operatingsystem Debug: Facter: List of resolvable facts: [#@fact_class=Facts::Linux::Os::Name, @filter_tokens=[], @user_query="operatingsystem",

Re: [Puppet Users] Could not retrieve local facts: can't create Thread: Resource temporarily unavailable

2020-12-08 Thread Helmut Schneider
Am 08.12.2020 um 14:45 schrieb Helmut Schneider: Am 08.12.2020 um 13:15 schrieb Bogdan Irimie: Facter 4 resolves each fact on a separate thread, this can lead to a high number of threads being created. Can you please provide the output of `cat /proc/sys/kernel/threads-max` on the system where

Re: [Puppet Users] Could not retrieve local facts: can't create Thread: Resource temporarily unavailable

2020-12-08 Thread Helmut Schneider
Am 08.12.2020 um 13:15 schrieb Bogdan Irimie: Facter 4 resolves each fact on a separate thread, this can lead to a high number of threads being created. Can you please provide the output of `cat /proc/sys/kernel/threads-max` on the system where you see this issue? Does this happen at every

[Puppet Users] FIll array in loop

2022-01-09 Thread Helmut Schneider
Hi, I need to fill an array in a loop. While I understand variable scoping I found some information that it is possible. https://stackoverflow.com/questions/41041549/puppet-adding-array-elements-in-a-loop/41047623

Re: [Puppet Users] FIll array in loop

2022-01-10 Thread Helmut Schneider
Am 10.01.2022 um 08:04 schrieb 'Dirk Heinrichs' via Puppet Users: Am Sonntag, dem 09.01.2022 um 15:31 +0100 schrieb Helmut Schneider: Unfortunately I'm not able to adapt it to my needs: $array = [] [1, 2, 3].each |$variable| {   add $variable to $array } Any tips? The first link you posted

Re: [Puppet Users] FIll array in loop

2022-01-12 Thread Helmut Schneider
Am 10.01.2022 um 18:07 schrieb Karsten Heymann: Hi Helmut, you could take this as a starting point (untested): $profile_logging = $profiles.map | $p_name, $p_data | { $p_data.map | $s_name, $s_data | { $s_data['syslog'] } }.flatten p_ is the outer profile layer, s_ is the inner service

Re: [Puppet Users] FIll array in loop

2022-01-10 Thread Helmut Schneider
Am 10.01.2022 um 15:55 schrieb 'Dirk Heinrichs' via Puppet Users: > Am Montag, dem 10.01.2022 um 14:29 +0100 schrieb Helmut Schneider: > >> I'm afraid I still do not unterstand this correctly: >> >> profiles: >>vpn: >> openvpn: >>

[Puppet Users] Can't knockout value

2022-03-24 Thread Helmut Schneider
Hi, my hiera.yaml: --- version: 5 defaults: datadir: /etc/puppetlabs/code/environments/%{::environment}/hieradata data_hash: yaml_data hierarchy: - name: "Nodes" path: "nodes/%{::fqdn}.yaml" - name: "Domains" globs: - "domains/%{::domain}/*.yaml" - name:

Re: [Puppet Users] Can't knockout value

2022-03-25 Thread Helmut Schneider
Am 24.03.2022 um 15:18 schrieb Tim Skirvin: Helmut Schneider writes: paths: - "%{::operatingsystem}-%{::operatingsystemrelease}.yaml" - "%{::operatingsystem}-%{::virtual}.yaml" - "%{::operatingsystem}.yaml" - "%{::kernel}.yaml&qu

[Puppet Users] Nested hiera lookup

2022-01-27 Thread Helmut Schneider
Hi, common.yaml: --- lookup_options: paths: merge: strategy: 'deep' knockout_prefix: '--' variables: merge: strategy: 'deep' knockout_prefix: '--' paths: logfilePath: '/var/log' [...] another.yaml: lookup_options: paths: