Re: [Puppet Users] Puppetserver failing to start on a brand new Debian 12 VM

2024-04-23 Thread Martin Alfke
> On 23. Apr 2024, at 14:21, kristian...@gmail.com > wrote: > > I see > > root@puppetserver:~# apt policy puppetserver > puppetserver: > Installed: 7.9.5-2 > Candidate: 7.9.5-2 > Version table: > *** 7.9.5-2 500 > 500 http://deb.debian.org/debian bookworm/main amd64

Re: [Puppet Users] Puppetserver failing to start on a brand new Debian 12 VM

2024-04-23 Thread Martin Alfke
> On 23. Apr 2024, at 10:31, 'Dirk Heinrichs' via Puppet Users > wrote: > > Am Dienstag, dem 23.04.2024 um 10:29 +0200 schrieb Dirk Heinrichs: > >> Not true. They exist since years: > > Or did you mean "... for Debian 12"? Yes. As far as I know there are no packages for puppetserver and

Re: [Puppet Users] Puppetserver failing to start on a brand new Debian 12 VM

2024-04-23 Thread Martin Alfke
and >> Puppet 7. > > Did you install from Debian or Puppetlabs packages? There are still no PuppetServer packages from Puppet. Seems as if you used the Debian packages provided by the distribution. Does the server have enough memory to start the Java process? Which Java version

Re: [Puppet Users] Problem with exported ressource file.

2024-03-30 Thread Martin Alfke
> On 30. Mar 2024, at 09:35, Albert Shih wrote: > > Le 29/03/2024 à 18:46:47+0100, Martin Alfke a écrit >> > Hi, > >>> If I do something like >>> >>> $group_hosts.each | String $host | { >>> @@file { "file for ${host}"

Re: [Puppet Users] Problem with exported ressource file.

2024-03-29 Thread Martin Alfke
> On 29. Mar 2024, at 14:37, Albert Shih wrote: > > Hi, > > I'm not 100% sure it's a bug, just 99%. What do you think ? > > If I do something like > > $group_hosts.each | String $host | { >@@file { "file for ${host}": > ensure => present, > path => '/etc/something.conf',

Re: [Puppet Users] fstab not updated by mountpoint ensure absent

2024-01-30 Thread Martin Alfke
Hi Miriam, You showed us some yaml (I assume hiera) data. We cannot say for sure what these data do. Can you please also provide the puppet code which should use the data? Hth, Martin > On 30. Jan 2024, at 14:25, Miriam Olmi > wrote: > > I mounted a shared file system

Re: [EXTERNAL] - [Puppet Users] Puppet (open source) Web Interface

2023-12-15 Thread Martin Alfke
His Ferdana, We have several customers who run Puppet Agent on windows (server and workstation). Check puppet.conf file and specify the server within the agent section. Also see: https://www.puppet.com/docs/puppet/7/services_agent_windows.html Hth, Martin > On 15. Dec 2023, at 04:41, Ferd

Re: [EXTERNAL] - [Puppet Users] Puppet (open source) Web Interface

2023-12-12 Thread Martin Alfke
Besides foreman there is puppetboard which shows reports and facts from puppetdb. https://github.com/voxpupuli/puppetboard Hth, Martin > On 12. Dec 2023, at 11:20, 'Dirk Heinrichs' via Puppet Users > wrote: > > Am Sonntag, dem 10.12.2023 um 20:11 -0800 schrieb Ferdana Syapu

Re: [Puppet Users] convert hiera value to string array using lookup in hiera

2023-11-13 Thread Martin Alfke
Hi, Lookup always returns strings. You can use alias to retrieve the original value data type. https://www.puppet.com/docs/puppet/7/hiera_merging.html#alias-function Hth, Martin > On 13. Nov 2023, at 17:35, 'Tidhar Klein Orbach' via Puppet Users > wrote: > > Hi, > > I

Re: [Puppet Users] Error 500 on SERVER undefined method safe_load

2023-11-09 Thread Martin Alfke
> On 8. Nov 2023, at 20:17, James Millsap wrote: > > Thank you very much for the reply! We are running these versions... > > puppetserver version: 5.3.11 > ruby 2.0.0p648 > psych (2.0.0) > hiera 3.12.0 That is super outdated Puppet version. Can you please check the puppetserver log file.

Re: [Puppet Users] ERROR Facter - Error while resolving custom fact fact='letsencrypt_directory', resolution='': header too long

2023-09-21 Thread Martin Alfke
The fact reads certificates from several lets encrypt directories. See https://github.com/voxpupuli/puppet-letsencrypt/blob/master/lib/facter/letsencrypt_directory.rb I see in our code snippet, that you create empty files as cert files. Can you please check that the files in the directories are

Re: [Puppet Users] Call puppet define from Hiera

2023-08-31 Thread Martin Alfke
You either need a appconfig/manifests/init.pp class, or you can make use of stdlib::manage class and add the defined type to hiera See examples in https://dev.to/betadots/puppet-is-yaml-2e32 > On 28. Aug 2023, at 21:23, Ben Parry wrote: > > Puppeteers, > > I am bashing my head against a wall

Re: [Puppet Users] How to create new tickets now?

2023-08-31 Thread Martin Alfke
Hi Dirk, Maybe this one? https://puppet.atlassian.net/jira/projects Hth, Martin > On 25. Aug 2023, at 15:49, 'Dirk Heinrichs' via Puppet Users > wrote: > > Hi, > > PuppetLabs seems to have migrated https://tickets.pupptlabs.com > <https://tickets.pupptlabs.com

Re: [Puppet Users] Puppet8 'lookup' fails when Puppet7 succeeds

2023-08-24 Thread Martin Alfke
Hi Jon, Do you have a node named “puppet.staging” running against you puppet staging environment? The —node option reads nodes facts from PuppetDB. That means that you must have anode connected to the puppet server where sou want to run the puppet lookup command. Hth, Martin > On 23.

Re: [Puppet Users] Custom Fact Deployment

2023-08-07 Thread Martin Alfke
to all nodes. Please note that pluginsyc will download the bash scripts to any Puppet agent, regardless of OS. Hth, Martin > On 3. Aug 2023, at 09:32, 'Alessandro Ciappei' via Puppet Users > wrote: > > Hello All, > > maybe it's already has been discussed, I tried to search

Re: [Puppet Users] Puppetserver7 or 8 support for Ubuntu Jammy 22.04 LTS

2023-05-12 Thread Martin Alfke
Packages for Jammy are expected to be available in Q3 2023. > On 11. May 2023, at 20:07, rbmr...@gmail.com wrote: > > Hi Team, > Do we have a puppetserver opensource package for Ubuntu 'jammy' > 22.04? > I tried and installed repository from >

Re: [Puppet Users] saz-ssh, hiera and options

2023-05-02 Thread Martin Alfke
aci D wrote: > > Thank you Martin, adding the following example to my nodes/myserversfqdn.yaml > did it for me. > > ssh::server::match_block: > '*,!that_other_group': > type: group > options: > ForceCommand: '/usr/bin/kpasswd' > > I have

Re: [Puppet Users] saz-ssh, hiera and options

2023-05-02 Thread Martin Alfke
is in the docs: https://forge.puppet.com/modules/saz/ssh/readme#hiera-example Hth, Martin > On 1. May 2023, at 23:08, Laci D wrote: > > Hi, > > I'm using saz-ssh to configure sshd_config, options are stored in Hiera. I > didn't find the way how to implement "Match u

Re: [Puppet Users] hiera, template and array

2023-03-29 Thread Martin Alfke
> > templates/ntp/ntp.conf.epp > <% @ntp[’servers’].each { |server| -%> > server: <%= server %> > <% } -%> > > And this is the hiera (as of now there is only one ntp server but there'll be > more in the future): > ntp: > servers: > -

Re: [Puppet Users] hiera, template and array

2023-03-28 Thread Martin Alfke
2023, at 14:37, Laci D wrote: > > Thank you Martin! > > I used your example and I think something is missing. > Since "servers" is under "ntp" in the hiera file (see example in my original > email) maybe we need to define that in the erb file? > >

Re: [Puppet Users] hiera, template and array

2023-03-28 Thread Martin Alfke
You must iterate as servers is an array: <% $servers.each |$server| { -%> server: <%= $server %> <%- } -%> > On 27. Mar 2023, at 22:21, Laci D wrote: > > I'm working on defining NTP servers from Hiera. > > For Linux servers I have been using puppetlabs-ntp, which has been working > nicely.

Re: [Puppet Users] Enc forcing environment even passed via command line

2023-01-13 Thread Martin Alfke
Hi Tejas, Nodes which should not have environment pinning should not have an environment entry set by the ENC. This will allow the agent to switch to any environment. Hth, Martin > On 13. Jan 2023, at 08:37, Tejas Bhosale wrote: > > I am using self written script took as ref

Re: [Puppet Users] Enc forcing environment even passed via command line

2023-01-12 Thread Martin Alfke
environment. What are you using? PE? Foreman? A self written script? Something different? Martin > On 12. Jan 2023, at 08:20, Tejas Bhosale wrote: > > Hi, > I have enc script which when executed in output it post environemnt. > > But for some host when i want to test my changes

Re: [Puppet Users] Puppet filters

2022-12-18 Thread Martin Alfke
Hi Nir, do you only need the capacity from the root file system? You can access the data hash directly: $facts['mountpoints']['/']['capacity'] hth, Martin > On 18. Dec 2022, at 08:44, Nir Fishler wrote: > > Hey Guys, > > I'm trying to pull data from an array using the 'moun

Re: [Puppet Users] Using VS Code with PDK -- how can I manually run puppet-lint?

2022-12-05 Thread Martin Alfke
PDK allows you to also run rake tasks pdk bundle exec rake -T Gives you an overview on available rake tasks. > On 5. Dec 2022, at 07:08, Dan Mahoney wrote: > > It turns out the answer to my second question is: > > gem install voxpupuli-puppet-lint-plugins > > ...which seems to be a meta

Re: [Puppet Users] Create a variable out of a bash command and notify it

2022-12-04 Thread Martin Alfke
grep '^Inst' | awk -F ' ' '{print $2}'") end end Within your puppet code you can then refer to the fact: notify { $upgradable_packages: } Hth, Martin > On 4. Dec 2022, at 16:43, Nir Fishler wrote: > > Hello, > > I'd like to store an output of a bash command into a

Re: [Puppet Users] How to install puppet-server on centos stream 9?

2022-11-22 Thread Martin Alfke
Hi Ruinan, There are not (yet) packages for puppet server for RHEL 9 based distributions. http://yum.puppet.com/puppet7/el/9/x86_64/index.html At the moment you must use RHEL 8 based distribution for Puppet Server: http://yum.puppet.com/puppet7/el/8/x86_64/index.html Hth, Martin > On 21.

Re: [Puppet Users] Error: Could not run: cannot load such file -- net/ssh/telnet

2022-11-17 Thread Martin Alfke
Hi, Your puppet agent is missing a ruby gem: https://rubygems.org/gems/net-ssh-telnet This gem must be installed using the puppet ruby gem command: /opt/puppetlabs/puppet/bin/gem install net-ssh-telnet Hth, Martin > On 15. Nov 2022, at 10:53, Mike wrote: > > Hi, > > I

Re: [Puppet Users] not possible to access parameters from subclass

2022-11-17 Thread Martin Alfke
Hi, The testa::config manifests does not contain a class, but a defined resource types. One can only access variables from included classes, but not from defined types. Hth, Martin > On 14. Nov 2022, at 15:29, Jens Kuehnel wrote: > > Hi all, > > I'm using puppet for quite so

Re: [Puppet Users] Copy file from Agent to Master

2022-11-10 Thread Martin Alfke
rving.html Hth, Martin > On 8. Nov 2022, at 13:57, Dennis Sullivan > wrote: > > Hi Puppet Users, > > Can someone provide input. I am trying to write a file from the puppet agent > (i.e. /etc/ssh/host.pub) to the puppet master that has a custom mount point > on it. I don

Re: [Puppet Users] [PuppetDB] Error 500 'Failed to execute '/pdb/cmd/v1....'

2022-11-02 Thread Martin Alfke
a complete success. > > On Monday, October 31, 2022 at 12:14:31 PM UTC+2 Martin Alfke wrote: >> How did you configure puppetdb and puppetserver? >> On Open Source we usually recommend the puppetlabs-puppetdb module. >> >> >> >>> On 31. Oct 2022, at 10:39, Nir Fis

Re: [Puppet Users] Puppet agent is not running on Windows 11

2022-11-01 Thread Martin Alfke
Hi Stephan’s,, You can not run puppetserver on Windows. Puppetserver is a Linux only process. If you run Windows only, you can make use of the puppetserver docker container. hth, Martin > On 31. Oct 2022, at 17:32, Stephanos Economides > wrote: > > Hi Puppet Users, > &g

Re: [Puppet Users] Resource default values from site.pp not applied

2022-10-31 Thread Martin Alfke
> Am Montag, dem 31.10.2022 um 15:10 +0100 schrieb Martin Alfke: > >> Is attribute the correct parameter of some_resource type? > > Yes. > >> You mention that notify returns the desired results, therefore I assume that >> hiera returns a proper value for ’some.

Re: [Puppet Users] Resource default values from site.pp not applied

2022-10-31 Thread Martin Alfke
defaults in a class? Defaults in a class overwrite defaults from site.pp. Hth, Martin > On 31. Oct 2022, at 14:48, 'Dirk Heinrichs' via Puppet Users > wrote: > > Hi, > > I'm currently stuck with a problem where resource defaults from site.pp are > not applied, for ex

Re: [Puppet Users] [PuppetDB] Error 500 'Failed to execute '/pdb/cmd/v1....'

2022-10-31 Thread Martin Alfke
How did you configure puppetdb and puppetserver? On Open Source we usually recommend the puppetlabs-puppetdb module. > On 31. Oct 2022, at 10:39, Nir Fishler wrote: > > Hey Martin, > > Thanks for your reply. > > There are three files underneath that directory:

Re: [Puppet Users] PuppetDB - ERROR [p.p.config] No subname set in the "database" config`

2022-10-13 Thread Martin Alfke
Then remove the files /etc/puppetlabs/puppet/routes.yaml and /etc/puppetlabs/puppet/puppetdb.conf Now restart the puppetserver process. Then you can make use of the module and run the puppet agent on your puppet server. > On 12. Oct 2022, at 16:46, Callum McCrorie wrote: > > Hi Ma

Re: [Puppet Users] PuppetDB - ERROR [p.p.config] No subname set in the "database" config`

2022-10-12 Thread Martin Alfke
automate your automation (which is your Puppet server). hth, Martin > On 12. Oct 2022, at 16:05, Callum McCrorie wrote: > > Thank you Martin for your help with this. > I have tried implementing what you suggested above and moving the database > config to database.ini. Unfortunately

Re: [Puppet Users] PuppetDB - ERROR [p.p.config] No subname set in the "database" config`

2022-10-11 Thread Martin Alfke
Hth, Martin > On 10. Oct 2022, at 15:42, Callum McCrorie wrote: > > Hello, > I’m reaching out about an issue related to PuppetDB. I am hoping that > someone will be able to assist myself and my coworker in solving this > problem. > > When I take a look inside the pup

Re: [Puppet Users] [PuppetDB] Error 500 'Failed to execute '/pdb/cmd/v1....'

2022-10-10 Thread Martin Alfke
Hi Nir, Please check the puppetdb log file for further error investigation. Usually this is located at /var/log/puppetlabs/puppetdb/puppetdb.log Hth, Martin > On 30. Sep 2022, at 10:30, Nir Fishler wrote: > > Hello, > > puppetserver version: 7.8.0 (CentOS 7) | hostname: pup

Re: [Puppet Users] Getting started - yikes

2022-07-29 Thread Martin Alfke
2019.8/supported_operating_systems.html#supported_operating_systems <https://puppet.com/docs/pe/2019.8/supported_operating_systems.html#supported_operating_systems> which will list also required packages. Hth, Martin > On 29. Jul 2022, at 06:00, ch...@freeranger.com wrote: > > I've b

[Puppet Users] Hiera Data Manager Demo available

2022-07-28 Thread Martin Alfke
hdm> We have set up a demo environment which will be available until August 4th 2022. URL: http://puppet.hdm.betadots.training:3000 Username: u...@domain.tld Password: user We love to hear feedback or comments from you. h...@betadots.de <mailto:h...@betadots.de> Best regards, Mar

[Puppet Users] Puppet 7 lookup not behaving as expected

2022-07-21 Thread Terrence W Martin
Hi, I have a recent puppet installation that is giving me some unexpected results. When I run puppet lookup hascert --environment production --explain hascert is my own defined value in Hiera, useful for testing. Anyway I get the expected output with the above command, the value of

Re: [Puppet Users] Bolt: How to upload a downloaded file?

2022-04-27 Thread Martin Alfke
Hi, You can reference the actual path by using pwd: bolt file upload $(pwd)/inventory.yaml /root/ -t login Hth, Martin > On 27. Apr 2022, at 14:24, Helmut Rickel wrote: > > Hello, > this surely is a beginners question: > Using bolt, I want to download a file from one se

Re: [Puppet Users] hiera 5 postgresql backend

2022-04-14 Thread Martin Alfke
backend. With hiera5 you can of course write new backends. Please note that the hiera3 backends are not compatible with hiera5! https://puppet.com/docs/puppet/7/hiera_custom_backends.html <https://puppet.com/docs/puppet/7/hiera_custom_backends.html> Hth, Martin > On 14. Apr 2022, at 04:

Re: [Puppet Users] Custom functions what way forward

2022-03-24 Thread Martin Alfke
Hi Baz, There are two APIs for custom types/providers within modern Puppet. The “old” API uses the Puppet::Type.newtype syntax. I gave a talk on this topic a couple of years ago: https://www.slideshare.net/PuppetLabs/puppetconf-2016-moving-from-exec-to-types-and-providers-martin-alfke-example42

Re: [Puppet Users] Ruby gem-ruby-shadow RPM on RHEL 8 ?

2022-03-21 Thread Martin Alfke
national Corporation (SAIC) > Office: (301) 286-6919 > Mobile: (240) 513-5290 > > From: Puppet-Users Mailing List <mailto:puppet-users@googlegroups.com>> on behalf of Martin Alfke > mailto:tux...@gmail.com>> > Reply-To: Puppet-Users Mailing List <mailto:puppet

Re: [EXTERNAL] [Puppet Users] Re: Ruby gem-ruby-shadow RPM on RHEL 8 ?

2022-03-21 Thread Martin Alfke
you can directly start using the user resource type. No need to install anything. Hth, Martin > On 21. Mar 2022, at 11:23, 'White, Daniel E. (GSFC-770.0)[NICS]' via Puppet > Users wrote: > > Ny use case is > https://puppet.com/docs/puppet/7/types/user.html#user-provider-userad

Re: [Puppet Users] Puppet doens't sync from Master

2022-03-01 Thread Martin Alfke
. hth, Martin > On 1. Mar 2022, at 11:05, 'Alessandro Ciappei' via Puppet Users > wrote: > > Hi Martin, > > thank you for your reply. > Indeed the classes.txt file is different. > > On the client, there are only 'settings' and missing all other classes. > If I

Re: [Puppet Users] Puppet doens't sync from Master

2022-02-28 Thread Martin Alfke
Check on both nodes the content of files in /opt/puppetlabs/puppet/cache/state directory. Especially classes.txt and resources.txt. If file content differs between the two nodes, your classification is not identical. hth, Martin > On 28. Feb 2022, at 12:29, 'Alessandro Ciappei' via Pup

Re: [Puppet Users] Nested hiera lookup

2022-01-28 Thread Martin Alfke
t/7/hiera_merging.html#interpolation_functions-lookup-and-hiera-function> Hth, Martin > On 27. Jan 2022, at 16:22, Helmut Schneider wrote: > > Hi, > > common.yaml: > --- > lookup_options: > paths: >merge: > strategy: 'deep' > knockout_

Re: [Puppet Users] Puppet Manifest using to_json_pretty help

2021-12-07 Thread Martin Alfke
class demo ( Array[Hash] $para5, ){ file { '/etc/example.json’: ensure => file, content => to_json_pretty({ section1 => { para1 => somevalue, para2 => somevalue, para3 => somevalue, para4 => somevalue, para5 => $para5, }, true), }

Re: [Puppet Users] Help with Bolt Puppet DSL example

2021-11-18 Thread Martin Alfke
over a number of nodes. In you case I would head to a task. When using pdf, you can run pdf new task within a module. You can then use bolt to execute a task: bolt task run —nodes The task istself: #modules/demo/tasks/test.sh #!/bin/bash touch sudo touch Hth, Martin > On 17. Nov 2

Re: [Puppet Users] how do puppet agent service record and determine next request timepoint?

2021-10-15 Thread Martin Alfke
environment (more than 4000 nodes) we recommend to add Puppet compilers behind a load balancer. The CA will still run on the primary server, but load is spread amongst more systems (catalog compilation). Hth, Martin > On 14. Oct 2021, at 04:13, 羽色云烟 wrote: > > Background: > Our a p

Re: [Puppet Users] Hiera driving me round the bend

2021-10-14 Thread Martin Alfke
=> $name, } } This will return all of the existing profile::attributes::name Hier keys available for a node in all hierarchies. Using the above mentioned code and data this will return: [‘DNS-Slave’, ‘Oracle’] Hth, Martin > On 10. Oct 2021, at 21:48, David Murphy wrote: > > Hi Guy

Re: [Puppet Users] Puppet7 and Ansible = conflict

2021-08-27 Thread Martin Alfke
Hi Arpin, Sounds like an utf-8 problem: `to_json': source sequence is illegal/malformed utf-8 Please run the facter -j command on the windows system and check that it returns the values. Check which locale is configured when running ansible on the windows system. Hth, Martin > On 27.

Re: [Puppet Users] Getting the location of the manifest file

2021-08-16 Thread Martin Alfke
Hi Go, what do you want to achieve? When using puppet apply, a manifest can be anywhere on the filesystem. Best, Martin > On 16. Aug 2021, at 03:18, Go Iwai wrote: > > Hello, > > I want to know the location where puppet-apply locally applied the > manifest file.

Re: [Puppet Users] Azure Ruby gems are not loading.

2021-07-16 Thread Martin Alfke
/puppet/bin/gem install). hth, Martin > On 16. Jul 2021, at 09:13, Raghu Ram Baisani > wrote: > > Hi Team > > I have installed the gem azure-storage-blob on puppet master using below > command. > > sudo puppetserver gem install azure-storage-blob > > When I exec

Re: [Puppet Users] Override default schedule for all resources

2021-07-07 Thread Martin Alfke
load on the server. hth, Martin > On 5. Jul 2021, at 11:28, 'Christian Masopust' via Puppet Users > wrote: > > Hi puppet users, > > we have a daily planned maintenance at 5am on our puppet server which means > that during that time > it’s not available for ou

Re: [Puppet Users] Determining puppet env from client

2021-06-22 Thread Martin Alfke
agent. But I always thought that server side facts are shown in PE on the Node facts. But I might be wrong. Best, Martin > On 22. Jun 2021, at 14:45, daveford...@gmail.com > wrote: > > Hi Maritn, thanks for answering. > > Yes, that's the sort of thing I was expectin

Re: [Puppet Users] Determining puppet env from client

2021-06-22 Thread Martin Alfke
, Martin > On 22. Jun 2021, at 13:58, daveford...@gmail.com > wrote: > > Hi - I've just starting working with a complex puppet environment that's > running with dozens of different environments. > > The PE console doesn't really seem to give me a way to filter

Re: [Puppet Users] Hiera lookup in hiera lookup

2021-05-18 Thread Martin Alfke
arrays or hashes within a nested lookup you must use the alias function. hth, Martin > On 18. May 2021, at 10:23, Erwin Bogaard wrote: > > Hi, > > I've been looking for this for a ling time, but can't find a definitive > answer to my question: is it possible to

Re: [Puppet Users] Using the puppet gem on an unsupported platform

2021-03-19 Thread Martin Alfke
Hi Mark, Have you installed the puppet mount core module only on the agent or also on the master? Usually you install modules only on the master and all resource types get synced to all agents. You need the module on the agent if you want to run puppet apply only. Hth, Martin > On 18.

Re: [Puppet Users] Using the puppet gem on an unsupported platform

2021-03-11 Thread Martin Alfke
Hi Mark, You can check if a type is available by running puppet describe -l This will print out all available puppet custom types. Best, Martin > On 11. Mar 2021, at 18:11, Mark Dixon wrote: > > Hi Martin, > > Thanks - but that doesn't seem to be the problem,

Re: [Puppet Users] Using the puppet gem on an unsupported platform

2021-03-10 Thread Martin Alfke
Hi Mark, please check module path using 'puppet config print modulepath' and install the required core modules into one of the mentioned folders: puppet module install puppetlabs-mount_core --target-dir This should make the mount resource type available. Best, Martin > On 10. Mar 2021, at

Re: [Puppet Users] How to stub a custom puppet function in every spec test?

2021-03-09 Thread Martin Alfke
Hi Nick, This is working as expected. Many thanks for the fix. Martin > On 8. Mar 2021, at 19:25, Nick Bertrand wrote: > > Hi Martin, > > Using rspec-puppet's pre_condition seems to work for me: > > RSpec.shared_context "read_url stub" do > let (:pre_

[Puppet Users] How to stub a custom puppet function in every spec test?

2021-03-05 Thread Martin Alfke
Puppet::Functions.create_function(:'profile::read_url') do return 'ssh-rsa Azuozgouzvouzvf== u...@domain.tld' end it { is_expected.to compile } end end end Best, Martin -- You received this message because you are subscribed to the Google Groups "Pupp

Re: [Puppet Users] Hiera data repetition

2021-02-28 Thread Martin Alfke
Hi Karsten, > On 27. Feb 2021, at 18:18, Karsten Heymann wrote: > > Hi Martin, > > regarding your "no lookup" policy, how do you handle for example deep merge > lookups. They cannot be used with automatic data binding, or am I wrong? > we set the

Re: [Puppet Users] Hiera data repetition

2021-02-27 Thread Martin Alfke
ed lookups always use short key names, usually prefixed with company or department or team short name - e.g. company_ldap_pass This pattern allows us to strictly separate data which are needed multiple times in hiera. Using automatic data binding and the name convention on nested looku

Re: [Puppet Users] Regarding managing packages

2021-02-26 Thread Martin Alfke
Hi, You need a class with a parameter. e.g. class profile::packages ( Array $pgk = {}, ){ $pkg.each |$package| { package { $package: ensure => present, } } And in hiera: profile::packages::pkg: - ‘htop’ - ‘less’ - ‘anyotherpackage’ Hth, Martin > On 26. Feb 2021,

Re: [Puppet Users] No subname set in the "database" config

2021-02-13 Thread Martin Alfke
/puppetdb/conf.d directory. Maybe you missed the config in the puppetdb conf.d directory. hth, Martin > On 12. Feb 2021, at 18:28, Spriya wrote: > > Hi, > > I am trying to setup new open source puppetmaster and database. And i am > seeing this error > > Feb 12

Re: [Puppet Users] create_resources

2021-02-07 Thread Martin Alfke
faults, } } } } hth, Martin > On 6. Feb 2021, at 14:34, Nerbolff wrote: > > hello there, > > I would like to clean up my puppet recipes. > My init.pp. I have ~three_hundred entries as 'new resources'(see below). > here is how is setup today. I am wondering if we could

Re: [Puppet Users] init config once

2021-01-29 Thread Martin Alfke
ing its contents during the first Puppet run. The next > > Puppet runs should ignore any changes. > > > > > > On Thu, 2021-01-28 at 20:07 +0100, Martin Alfke wrote: > > > and please use ensure => file ! > > > this is more clear. > > > you can

Re: [Puppet Users] init config once

2021-01-28 Thread Martin Alfke
and please use ensure => file ! this is more clear. you can set the file ensure attribute to one of the following: file, directory, link, absent > On 28. Jan 2021, at 18:58, Ben Ford wrote: > > Yep, just use the replace attribute on the file resource. >

Re: [Puppet Users] Windows exec resource cannot find command error

2020-12-09 Thread Martin Alfke
e due to spaces: > > exec { '"c:/program files/telegraf/telegraf.exe" --service install': > ... > > > On Monday, December 7, 2020 at 2:06:53 PM UTC-5 Martin Alfke wrote: > Have you tried using the full path to the executable? > > exec { 'c:/program fil

Re: [Puppet Users] Windows exec resource cannot find command error

2020-12-07 Thread Martin Alfke
Have you tried using the full path to the executable? exec { 'c:/program files/telegraf/telegraf.exe --service install' : ... } > On 7. Dec 2020, at 18:17, Michael Watters wrote: > > I have an exec resource in a manifest for our Windows nodes however the > command is failing each time that

Re: [Puppet Users] Looking up the value defined in the hiera.yaml

2020-11-30 Thread Martin Alfke
rg/GrhMkv/BfcodMuuqiSh/EfWPfG 8MPrPmSSAHktgKY81/lPHiz73OAaf7p7HSSclWpCUYUHiHGsi6gPLN9e3PoY Br4TmjA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBBxlWjEC2Ij08R/N7Vo 63EagBB6T4EMZSB/2E6dW8NFQP7o] hth, Martin > > This generates a notice like: > > Notice: /Stage[main]/xxx::zzz/Exec[/path/to/decrypted-file]/return

Re: [Puppet Users] Running plans from console

2020-11-06 Thread Martin Alfke
is: - deployed within a module to the puppet master - is placed into the plans folder of the module Hth, Martin > On 5. Nov 2020, at 13:55, Vinay Korrapati wrote: > > Hi Team, > > currently i am using puppet PE: 2019.8.1 version. > > followed the article: > https://p

Re: [Puppet Users] Puppet Agent Gem Install

2020-10-23 Thread Martin Alfke
Hi Tony, yes, restarting puppetserver is required once you install a puppetserver gem. Good to know that it is working. Happy puppetizing, Martin > On 21. Oct 2020, at 18:44, Tony Wu wrote: > > Hi Martin, > > Got it to work, it was indeed server side as you stated.

Re: [Puppet Users] Puppet Agent Gem Install

2020-10-20 Thread Martin Alfke
Hi Tony, puppet functions are executed on the puppet server. You need to install the gem within the puppet server puppetserver gem install my gem Hth, Martin > On 20. Oct 2020, at 21:37, Tony Wu wrote: > > Hi, > > I have a agent side function that requires a gem, so I

Re: [Puppet Users] Puppet Enterprise version upgrade from 2019.1.0 to 2019.8.1

2020-10-16 Thread Martin Alfke
without any issues. (But we enabled the PostgreSQL access prior we did the upgrade.) Best, Martin > On 16. Oct 2020, at 08:54, Vinay Korrapati wrote: > > Hi Team, > > I are planning to upgrade the Puppet Enterprise version from 2019.1.0 to > 2019.8.1 in development environme

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

2020-10-01 Thread Martin Alfke
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

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

2020-10-01 Thread Martin Alfke
t;http://lhcsrvprdidm02.fixnetix.com/> > On 1. Oct 2020, at 12:05, djc...@gmail.com wrote: > > 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

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

2020-09-28 Thread Martin Alfke
’ parameter? Hth, Martin > On 28. Sep 2020, at 15:18, djc...@gmail.com wrote: > > 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 > elsewher

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

2020-09-28 Thread Martin Alfke
iables, are always local to a class. Best, Martin > On 28. Sep 2020, at 12:03, djc...@gmail.com wrote: > > Thanks for that Martin, > > I seem to have unearthed a different issue: > > # puppet agent --no-daemonize --onetime --verbose > Error: Could not retrieve catalog from remo

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

2020-09-18 Thread Martin Alfke
ppet/6.17/hiera_intro.html> e.g. data/nodes/.yaml --- grubipv6disable::enable: false Hth, Martin > On 17. Sep 2020, at 19:19, djc...@gmail.com wrote: > > Hello experts, > > I apply all my current classes like so: > > # cat site.pp > > node default { > class { 'selinu

Re: [Puppet Users] [Puppet] Can't manage Puppet Certificates on the PuppetCA (404 error)

2020-08-26 Thread Martin Alfke
com/2018/10/08/puppet6-ca-upgrading/> Best, Martin > On 25. Aug 2020, at 00:32, damien...@gmail.com wrote: > > Hello, > > I have just finished installing a Puppet / Foreman / PuppetDB stack. Here is > the details : > > OS : Centos 8.2 > > Puppetserver ve

Re: [Puppet Users] Any Puppet APIs which integrate with Azure API Management Gateway

2020-07-14 Thread Martin Alfke
Hi Vinay, Puppet managed an Azure module - but no more development. https://github.com/puppetlabs/puppetlabs-azure <https://github.com/puppetlabs/puppetlabs-azure> You can check documentation at the link mentioned above and verify whether this module serves your needs. Hth, Martin &

Re: [Puppet Users] Parameters to Puppet Task

2020-06-30 Thread Martin Alfke
n) Hth, Martin > On 30. Jun 2020, at 02:58, Valayil Abraham wrote: > > I have a python task in Puppet. Passing a parameter into the task. Need to > check the parameter in the code. > This what the code check looks like > > if {params['date'] == "yesterday"}: >

Re: [Puppet Users] Error while installing the docker on Ubuntu 18.04 using existing puppet forge module

2020-06-25 Thread Martin Alfke
: use_upstream_package_source => false, In this case you must ensure, that the repository is added. Best regards, Martin > On 25. Jun 2020, at 10:38, Vinay Korrapati wrote: > > Hi Team, > > We are facing the below issue while installing the docker Ubuntu 18.04 using >

Re: [Puppet Users] Puppetdb and postgresql module: How to manage Postgresql but NOT manage Postgresql REPO using Hiera?

2020-06-13 Thread Martin Alfke
postgresql::globals::manage_package_repo: false postgresql::globals::version: '9.6', > On 12. Jun 2020, at 17:40, Devminded wrote: > > Hi. > > I am trying to disable the managing of the Postgresql repo using Hiera when > using the puppetlabs/postgresql module. I have tried every Hiera

Re: [Puppet Users] hiera with environments

2020-06-11 Thread Martin Alfke
b.com/example42/psick>) https://github.com/example42/psick/blob/production/Puppetfile#L7 <https://github.com/example42/psick/blob/production/Puppetfile#L7> Here we deploy the same branch name - when existing on hieradata repo - and fall back to master branch. Hth, Martin > On 9. Ju

Re: [Puppet Users] How to run yum update in puppet config.pp file?

2020-05-06 Thread Martin Alfke
tems and not which actions to run on systems, If you want to run something regular: then use cron! Hth, Martin -- 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, se

[Puppet Users] Splat operator on file resource Error

2020-04-29 Thread Martin Alfke
Notice: /Stage[main]/Profile::Files/Notify[_value]/message: defined 'message' as { 'ensure' => 'file,', 'mode' => '0644' } Notice: Applied catalog in 36.38 seconds What am I missing or doing wrong? Thanks, Martin -- You received this message because you are subscribed to the Google Group

Re: [Puppet Users] Puppet on Ubuntu Focal

2020-04-25 Thread Martin Alfke
Are you using system ruby, installing puppet as a Ruby gem? No need to do this. Puppet Agent ships required ruby version. Just add the repo (http://apt.puppetlabs.com/puppet6-release-focal.deb) and then install puppet-agent package. hth, Martin > On 24. Apr 2020, at 17:27, Arpit sharma wr

Re: [Puppet Users] Where is source rpm for puppet6 open source rpm

2020-04-23 Thread Martin Alfke
You can install the RPM on /opt folder and re-use the same installation on multiple systems. Just be sure to configure puppet agent to not store node specific information in /opt. Check config options by running "sudo puppet config print —all” after Puppet agent installation Hth, M

Re: [Puppet Users] Install software by running script

2020-04-15 Thread Martin Alfke
Hi Albert, > On 15. Apr 2020, at 15:51, Albert Shih wrote: > > Le 11/04/2020 à 12:15:12+0200, Martin Alfke a écrit > > Hi everyone. > >> > Thanks for the answer. > >>> I would like to have your point of view on how you install some software.

Re: [Puppet Users] Install software by running script

2020-04-11 Thread Martin Alfke
software installed by some > > wget 'URL' | sh > > (Ok I know it's not secure...) but well... The same pattern: let the wget | sudo bash command run on a dev platform or a container and build a package. hth, Martin > > I event find out a script I am unable to run th

Re: [Puppet Users] upgrading opensource from 5.5 to 6.x

2020-03-19 Thread Martin Alfke
et6-ca-upgrading/>) The Puppet doc has more information: https://puppet.com/docs/puppet/latest/release_notes_puppet.html#puppet-deprecations-x.0.0 <https://puppet.com/docs/puppet/latest/release_notes_puppet.html#puppet-deprecations-x.0.0> Best, Martin > On 19. Mar 2020, at 00:09, Ti

Re: [Puppet Users] Questions reg. Hiera v3 to v5 migration

2020-03-04 Thread Martin Alfke
case that you need to set hierarchy individual settings. Hth, Martin > > Once again, with better indentation: > > hierarchy: > - name: "Per-kernel data" > path: "kernel/%{facts.kernel}.yaml" > - name: "Common data" >

  1   2   3   4   5   6   7   >