Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-10-01 Thread djc...@gmail.com
Unfortunately still the same issue. On Thursday, October 1, 2020 at 11:58:45 AM UTC+1 Martin Alfke wrote: > One more try: > > In your manifests/site.pp change the class declaration from class to > include: > > node default { > # … > # class { 'grubipv6disable': } > include grubipv6disable

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-10-01 Thread Martin Alfke
One more try: In your manifests/site.pp change the class declaration from class to include: node default { # … # class { 'grubipv6disable': } include grubipv6disable # … } > On 1. Oct 2020, at 12:44, djc...@gmail.com wrote: > > Puppet 6: > > # puppet --version > 6.15.0 > > Yes, I

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-10-01 Thread djc...@gmail.com
Puppet 6: # puppet --version 6.15.0 Yes, I ran the lookup as root. On Thursday, October 1, 2020 at 11:40:49 AM UTC+1 Martin Alfke wrote: > Which version of puppet are you using? > Puppet 5 or puppert 6? > > And: did you ran the puppet lookup command as root user? (I assume so, I > just want

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-10-01 Thread Martin Alfke
Which version of puppet are you using? Puppet 5 or puppert 6? And: did you ran the puppet lookup command as root user? (I assume so, I just want to be sure) > On 1. Oct 2020, at 12:30, djc...@gmail.com wrote: > > Thanks Martin, yes (on fours servers to be specific all with idm0 in the >

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-10-01 Thread djc...@gmail.com
Thanks Martin, yes (on fours servers to be specific all with idm0 in the hostname). Problem I have, is although the lookup is returning what I need, when I run the agent, it returns: Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error:

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-10-01 Thread Martin Alfke
Hi Dan, The puppet lookup explain told you what it has found: Environment Data Provider (hiera configuration version 5) Using configuration "/etc/puppetlabs/code/environments/production/hiera.yaml" Hierarchy entry "Per-node data" Path

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-10-01 Thread djc...@gmail.com
Hello Martin, Do you have any further thoughts on the above? Thanks, Dan. On Monday, September 28, 2020 at 2:37:42 PM UTC+1 djc...@gmail.com wrote: > There is indeed a global hiera.yaml file: > # cat /etc/puppetlabs/puppet/hiera.yaml > --- > # Hiera 5 Global configuration file > > version: 5

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-09-28 Thread djc...@gmail.com
There is indeed a global hiera.yaml file: # cat /etc/puppetlabs/puppet/hiera.yaml --- # Hiera 5 Global configuration file version: 5 # defaults: # data_hash: yaml_data # hierarchy: # - name: Common #data_hash: yaml_data hierarchy: [] Top level environment hiera looks good: # cat

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-09-28 Thread Martin Alfke
In this case it is hiera. Can you please check: - that there is no global hiera.yaml file in /etc/puppetlabs/puppet/hiera.yaml or, that the data paths mentioned in that file are empty - that node is the top level environment in your environment hiera.yaml file

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-09-28 Thread djc...@gmail.com
Thanks again Martin, I've changed the code as per recommended. However, the same issue still persists. I'm starting to think that the issue is not code related but lies elsewhere # puppet agent --no-daemonize --onetime --verbose Info: Using configured environment 'production' Info:

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-09-28 Thread Martin Alfke
Hi Dan, I would write the grubipv6disable class in another way: class grubipv6disable ( Boolean $enable, ) { if $enable { contain grubipv6disable::config } } And keep the grubipv6disable::config class as is: class grubipv6disable::config ( ){ if $facts['os']['release']['major'] =~

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-09-28 Thread Rebecca Robinson
You can use the puppet lookup command with the explain flag to see what is being returned. https://puppet.com/docs/puppet/6.17/hiera_automatic.html#using_puppet_lookup On Mon, Sep 28, 2020, 6:03 AM djc...@gmail.com wrote: > Thanks for that Martin, > > I seem to have unearthed a different

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-09-28 Thread djc...@gmail.com
Thanks for that Martin, I seem to have unearthed a different issue: # puppet agent --no-daemonize --onetime --verbose Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Grubipv6disable]:

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-09-18 Thread Martin Alfke
Add a parameter to grubipv6disable class which controls the internal behaviour. https://puppet.com/docs/puppet/6.17/lang_classes.html#class-parameters-and-variables e.g. #

Re: [Puppet Users] Best way to exclude classes from a few nodes

2020-09-17 Thread niall . litchfield
I'm not an expert by any means. The *easiest *way would be to use regex for this - there's an example in https://puppet.com/docs/puppet/6.17/lang_node_definitions.html. On Thu, Sep 17, 2020 at 6:19 PM djc...@gmail.com wrote: > Hello experts, > > I apply all my current classes like so: > > #

[Puppet Users] Best way to exclude classes from a few nodes

2020-09-17 Thread djc...@gmail.com
Hello experts, I apply all my current classes like so: # cat site.pp node default { class { 'selinux': mode => 'permissive', type => 'targeted', } class { 'commonpackages': } class { 'polkit': } class { 'libstoragemgmt': } class { 'rngd':} class {