Re: [Puppet Users] Removing unmanaged path /etc/puppetlabs/code/environments/ - r10k

2016-06-17 Thread Michael Watters
I actually take the opposite approach. Modules from the forge go in a directory named "forge_modules" and r10k will leave anything located in modules alone. From r10k.yaml: forge 'http://forge.puppetlabs.com' moduledir 'forge_modules' On Friday, June 17, 2016 at 5:28:42 PM UTC-4, Rob

[Puppet Users] Re: Augtool installation

2016-06-24 Thread Michael Watters
You'll need to install the package that provides augtool in order to use it. yum provides augtool should show you what package to install. On Friday, June 24, 2016 at 9:29:25 AM UTC-4, Shrawan Bhagwat wrote: > > Hi All, > > I have installed Augeas setup from yum repository using command yum >

[Puppet Users] Re: environmentpath in manifest

2016-05-13 Thread Michael Watters
You may need to create a custom fact to determine the environment when the agent runs. For example, here's a custom fact that reads the environment from a file. Facter.add("environment") do setcode do Facter::Util::Resolution.exec('/bin/cat /usr/local/etc/environment') end end

[Puppet Users] Re: I am unable to download puppet 3 above version

2016-07-14 Thread Michael Watters
Depending on what you need you can install puppet packages directly from the puppet repos as documented here. https://docs.puppet.com/puppet/4.5/reference/install_linux.html#install-a-release-package-to-enable-puppet-collection-repositories On Thursday, July 14, 2016 at 3:12:51 AM UTC-4,

[Puppet Users] Re: hiera-eyaml not decrypting?

2016-07-08 Thread Michael Watters
I think I ran into a similar issue before. Try putting "eyaml" as the first backend to see if that helps. Here's a copy of our hiera.yaml file which works. --- :backends: - eyaml - yaml :hierarchy: - "nodes/%{::trusted.certname}" - common :yaml: # datadir is empty here, so hiera

[Puppet Users] Re: Issue with puppetlabs-java

2017-01-22 Thread Michael Watters
It looks like you need to add a package_type for deb and a case statement for Ubuntu. Would be a good time to patch the module and submit a pull request. :) On Friday, January 20, 2017 at 10:37:58 AM UTC-5, Salty Old Cowdawg wrote: > > Supposedly on the forge site it says the module was

[Puppet Users] Re: No nodes reported in Dashboard 2.0.0

2017-02-13 Thread Michael Watters
puppet-dashboard is EOL and has not been updated in quite a while. You'll need to move to a modern solution such as Puppetboard which does work with Puppet Server and Puppetdb 4. On Friday, February 10, 2017 at 3:06:23 PM UTC-5, Dimitri Yioulos wrote: > > Hi, All. > > Previously, I had a

[Puppet Users] Re: optimize my configuration

2017-02-13 Thread Michael Watters
ensure => '5.0' should work but you may want to add a dependency to the package resource to ensure that the file is downloaded first. package { "package": ensure => '5.0', provider => 'rpm', source => '/tmp/package-5.0.el6.noarch.rpm', require =>

[Puppet Users] Re: Puppet agent not able to connect to puppet server after rebooting puppet server

2016-10-24 Thread Michael Watters
Looks like your master's host name isn't included on the certificate. Are you able to run the agent using puppet agent -t --server puppet ? You can also see what host names are returned by the master's cert using openssl. openssl s_client -connect puppet:8140 This should show you the entire

[Puppet Users] Re: Announce: Puppet Agent 1.8.0 is available

2016-11-02 Thread Michael Watters
There seems to be a bug in the mount provider with the new puppet-agent 1.8 package. I have a node that is reporting changed file system options every time that puppet runs although nothing is actually changing. I downgraded back to puppet-agent 1.7.1 and this behavior goes away.

[Puppet Users] Re: How to find out, which directories/objects are puppetized?

2016-10-11 Thread Michael Watters
Puppet keeps a cache of classes and resources on every node. You can look at the /opt/puppetlabs/puppet/cache/state/resources.txt file to see which resources are managed by puppet. On Tuesday, October 11, 2016 at 7:41:11 AM UTC-4, Al wrote: > > Hi, subj. > Configuration is very complex,

Re: [Puppet Users] Custom Facts using awk

2017-03-30 Thread Michael Watters
%x is a ruby method which captures command output. IMO you can do most of what you need using native ruby methods, there's no need to pipe output to grep/sed/awk since ruby has built in pattern matching functions and if you're using ruby you might as well do it the ruby way. For example, this

[Puppet Users] Re: Custom Facts using awk

2017-03-22 Thread Michael Watters
You can do everything you need entirely in ruby. For example, here's a custom fact that returns the number of screens reported by the X server. Facter.add(:screen_count) do confine :kernel => 'Linux' setcode do @screens = Facter::Core::Execution.exec("/usr/bin/xrandr -display

[Puppet Users] Re: What's the best way to deal with multiple OS's

2017-03-02 Thread Michael Watters
This is pretty much exactly what module data is for. Check out https://docs.puppet.com/puppet/4.9/lookup_quick_module.html for more details. On Friday, September 30, 2011 at 2:33:50 PM UTC-4, Jeff Falgout wrote: > > We're in the situation of dealing with multiple operating systems (and >

[Puppet Users] Re: restart NginX ONCE (after default file has been removed)

2017-03-03 Thread Michael Watters
notify events are queued and grouped together so nginx should only be restarted once when puppet runs. You may also need to include nginx in your profile so that the service is properly defined. On Friday, March 3, 2017 at 7:00:36 AM UTC-5, Steve Button wrote: > > Hi, > > I've got a small

[Puppet Users] Re: restart NginX ONCE (after default file has been removed)

2017-03-03 Thread Michael Watters
Also, it looks like somebody tried to fix this previously but the changes weren't merged in. See https://github.com/voxpupuli/puppet-nginx/issues/333 for example. IMO there should be a class parameter to control this behavior so you might want to submit a PR with any changes you make. On

Re: [Puppet Users] Manage delivery and execution of RPMs not in YUM

2017-03-03 Thread Michael Watters
This would be the ideal but you *can* use the rpm provider when needed. For example: package { 'jdk': ensure => installed, provider => 'rpm', source => '/pub/oracle/jdk-8-linux-x64.rpm', } This will install the rpm using the defined source path. In our environment the /pub

[Puppet Users] Re: hiera style guide

2017-10-06 Thread Michael Watters
You do not *have* to quote strings however I have ran into issues with hiera turning strings that look like integers into an integer which causes problems when you attempt to do a key lookup using a string value or pass a value to a parameter that expects a string value. For example, there

[Puppet Users] Re: Data in Modules: Fail on unsupported OS

2017-08-25 Thread Michael Watters
I usually do this within the manifest itself. For example: if $facts['osfamily']!='RedHat'{fail("$operatingsystem is not supported")} On Tuesday, August 22, 2017 at 7:34:12 AM UTC-4, plapp...@gmail.com wrote: > > Good morning :) > > I'm currently writing a puppet module for the OpenBSD

[Puppet Users] Re: Clean Puppet 3 to Puppet 4 migration

2017-10-11 Thread Michael Watters
Been through a similar upgrade myself. The first step would be to spin up a new puppet master running Puppet Server. You can copy over the SSL dir from your old/current master to avoid SSL errors on the agents. For testing you'll want to make sure your manifests work correctly using the

[Puppet Users] rspec-puppet with custom types

2017-10-23 Thread Michael Watters
Hello, Does anybody know how to make rspec-puppet work with modules that use custom types for class parameters? I am getting an error when I run spec tests such as follows. # Puppet::ParseError: # Expected parameter 'ensure' of 'Class[Logrotate]' to have type Logrotate::Ensurable,

Re: [Puppet Users] rspec-puppet with custom types

2017-11-03 Thread Michael Watters
Thanks. I'll create an issue with the rspec-puppet project. On Tuesday, October 24, 2017 at 10:15:14 AM UTC-4, Henrik Lindberg wrote: > > On 23/10/17 22:29, Michael Watters wrote: > > Hello, > > > > Does anybody know how to make rspec-puppet work with modules th

[Puppet Users] Re: Managing "live" network configuration

2018-05-29 Thread Michael Watters
Not familiar with this module but you could set up a custom exec resource to restart the network when $facts['ipaddress'] does not match what is defined in hiera. We do something similar for SELinux to make sure the server is actually in the mode that it should be. On Thursday, May 24,

[Puppet Users] Re: Automatic parameter lookup including metaparameters

2018-08-16 Thread Michael Watters
> Is there in fact any reason for concern that applying class autofs before applying one or both of the other two might result in a Puppet failure or a target system misconfiguration? In this case, yes. In order for autofs to work properly NFS must be configured first and in order for NFS to

Re: [Puppet Users] Automatic parameter lookup including metaparameters

2018-08-13 Thread Michael Watters
the issue but it still feels like a kludge instead of a proper solution. On Thursday, August 9, 2018 at 3:33:47 PM UTC-4, Ben Ford wrote: > > Hi Michael. Can you share the code you tried and the errors you ran into? > > On Thu, Aug 9, 2018 at 11:30 AM Michael Watters > wrote

[Puppet Users] Re: Release and Archive repository changes for Puppet software

2018-08-13 Thread Michael Watters
Also, does the release-archives site have rsync enabled? On Thursday, August 9, 2018 at 7:29:40 PM UTC-4, Rob Kenefeck wrote: > > Hi Eric, when will this be happening? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this

[Puppet Users] Automatic parameter lookup including metaparameters

2018-08-09 Thread Michael Watters
Hello, Is it possible to define metaparameters for a resource in Hiera? For example, I have a class that is currently declared within another class as follows. if !defined(Class['autofs']) { class { 'autofs': require => [ Class['authconfig'],

Re: [Puppet Users] Puppet Apache Module

2018-08-24 Thread Michael Watters
What happens when there's a bug fix or security update that you need? Pinning versions also only works as long as you have no *other* modules that depend on a newer version of the apache module. IMO the apache module should not be dropping support for an Apache release that is still widely

[Puppet Users] Re: Duplicate declaration

2018-09-10 Thread Michael Watters
It sounds like your atqapache::vhost type is attempting to create the /var/www/dev/user1/client1 directory for every vhost that is defined. Can you post your definition for this type here? On Friday, September 7, 2018 at 5:05:44 PM UTC-4, Ugo Bellavance wrote: > > Hi, > > I have made a

[Puppet Users] Re: Duplicate declaration

2018-09-10 Thread Michael Watters
ption but this way ensures that the resource is only created once. On Monday, September 10, 2018 at 10:22:18 AM UTC-4, Ugo Bellavance wrote: > > > > On Monday, September 10, 2018 at 9:46:18 AM UTC-4, Michael Watters wrote: >> >> It sounds like your atqapache::vhost type is attem

[Puppet Users] Re: adding require to if/elseif statement?

2018-09-11 Thread Michael Watters
the package resource. Then as the file > doesnt exist the run fails. > Back to drawing board. > > Appreciate the quick reply. > > > On Tuesday, September 11, 2018 at 7:27:49 AM UTC-5, Michael Watters wrote: >> >> What you have there looks fine but I would change

[Puppet Users] Re: adding require to if/elseif statement?

2018-09-11 Thread Michael Watters
What you have there looks fine but I would change the elsif to an else statement. On Tuesday, September 11, 2018 at 8:08:53 AM UTC-4, Jason McMahan wrote: > > Good day, > I am attempting to add require to an if statement and not sure i am doing > it right. Any help would be greatly

[Puppet Users] Re: puppet in epel

2018-04-09 Thread Michael Watters
Most likely there are dependencies which would also need to be updated and Redhat likes to avoid breaking things in a RHEL release. If you really need the latest version of puppet installed the packages from the official repos work fine. On Thursday, April 5, 2018 at 12:26:19 PM UTC-4,

[Puppet Users] Re: PuppetDB: manually import reports

2018-04-19 Thread Michael Watters
Puppetdb data is all stored in postgresql so you should be able to copy the reports table from one server to the other. For example, run this on your prod node. pg_dump -h puppetdb-dev -U puppetdb -W -d puppetdb -t reports | psql -U puppetdb puppetdb I'm not sure if you need more than just

Re: [Puppet Users] rspec cannot load required gems

2018-04-23 Thread Michael Watters
Thanks. I found that adding "require 'parseconfig'" to the spec/spec_helper.rb file also allows the tests to run. bundle exec is failing with dependency errors as well. On Monday, April 23, 2018 at 5:24:08 PM UTC-4, Garrett Honeycutt wrote: > > On 4/23/18 4:38 PM, Micha

[Puppet Users] Re: Managing MySQL Users and Permissions with Puppet

2018-04-23 Thread Michael Watters
Use the puppetlabs-mysql module to manage the grants for each user/db. You can have different values for each environment stored in hiera. On Friday, April 20, 2018 at 11:42:22 AM UTC-4, Jonathan Preston wrote: > > I've searched for answers, but couldn't find anything quite matching my > use

[Puppet Users] rspec cannot load required gems

2018-04-23 Thread Michael Watters
Has anybody used rspec-puppet to run tests using a function that requires external ruby gems? I'm running unit tests on resources that call functions in the puppet_thycotic module however rspec is failing with an error as shown below. Failure/Error: require 'parseconfig'

[Puppet Users] Re: Pre-generated certificates?

2018-03-31 Thread Michael Watters
I've done this for a few nodes but I'm not sure how this would be an improvement over just enabling autosign. Private keys should remain private to a node and should never be transmitted over the network if possible. On Wednesday, March 28, 2018 at 3:10:35 PM UTC-4, Eric Sorenson wrote: > >

[Puppet Users] Puppet does not recognize bind mounts

2019-06-07 Thread Michael Watters
I'm having an issue with puppet repeatedly attempting to mount resources which are configured as bind mounts on one of my nodes. Here is a copy of the relevant lines from my manifest. $koji_fedora_releases = ['28', '29', '30'] $koji_fedora_releases.each |$release| { ['released',

Re: [Puppet Users] Re: [ACTION] Changes to release package links

2019-06-05 Thread Michael Watters
Hello, I see the puppetlabs-release-pc1 package is available on yum.puppetlabs.com however it doesn't actually show as an available update when running "yum update". For example, here's the output on one of our servers. ``` [root@server1 yum.repos.d]# yum update puppetlabs-release-pc1 Loaded

[Puppet Users] Re: [ACTION] Changes to release package links

2019-05-30 Thread Michael Watters
How does this change affect private mirrors? Will rsync services be available on the archive repos? On Monday, April 22, 2019 at 5:31:09 PM UTC-4, Molly Waggett wrote: > > TLDR: On May 14, 1. yum release packages will move to the top-level of > yum.puppet.com; 2. links to nightly release

Re: [Puppet Users] Puppet does not recognize bind mounts

2019-06-20 Thread Michael Watters
; ensure => 'mounted', > device => '/home', > dump=> '0', > fstype => 'none', > options => 'rw,bind,seclabel,relatime,errors=remount-ro', > pass=> '0', > target => '/etc/fstab', > } > > > -Original message- > *From:

[Puppet Users] stdlib module causes puppet failure

2019-06-20 Thread Michael Watters
I'm having an issue with the puppetlabs-stdlib module causing compilation failures using the puppet apply command. > Error: Class 'stdlib' is already defined (file: /mnt/live/puppeteer/conf.d/puppet/modules/stdlib/manifests/init.pp, line: 16); cannot redefine (file:

Re: [Puppet Users] Re: [ACTION] Changes to release package links

2019-06-10 Thread Michael Watters
e packages from > http://release-archives.puppet.com/yum/ if you want to continue using the > PC1 repository. Neither of these repos will receive future updates. > > If you have additional questions, please let me know! > > On Wed, Jun 5, 2019 at 10:36 AM Michael Watters

Re: [Puppet Users] stdlib module causes puppet failure

2019-06-26 Thread Michael Watters
Thanks. Unfortunately that doesn't seem to be the issue. There is no file named .resource_types within the puppet configuration dir. > > You may be running into > https://tickets.puppetlabs.com/browse/PUP-9602. Try deleting > /mnt/live/puppeteer/conf.d/puppet/.resource_types > > Josh > >

[Puppet Users] Packages for SLES 15

2019-07-02 Thread Michael Watters
Are there any plans to package puppet for SLES 15? I only see packages for SLES 11 and 12 at http://release-archives.puppet.com/yum/sles. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails

[Puppet Users] Re: Packages for SLES 15

2019-07-02 Thread Michael Watters
already as well. [image: Screenshot_SLES15_2019-07-02_11:41:26.png] On Tuesday, July 2, 2019 at 11:35:47 AM UTC-4, Michael Watters wrote: > > Are there any plans to package puppet for SLES 15? I only see packages > for SLES 11 and 12 at http://release-archives.puppet.com/yum/sles. &

[Puppet Users] Puppet errors on Fedora 33 RC1

2020-10-19 Thread Michael Watters
There appears to be an issue with the puppet agent on Fedora 33 RC1. Running the agent against a test environment results in errors as follows. Does anybody know how to resolve this? Info: Using configured environment 'dev27_f33' Info: Retrieving pluginfacts Error:

Re: [Puppet Users] Mysqldump using puppet

2020-08-03 Thread Michael Watters
Why do these feel like homework questions? :D You can add logic to your manifest based on what environment the agent is running under using simple if statements. For example: if $facts['environment'] != 'production' { notify { 'This is a non-production node!': } } If you're not

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

2020-12-08 Thread Michael Watters
ram files/telegraf', refreshonly => true, } On Tuesday, December 8, 2020 at 1:29:55 PM UTC-5 Michael Watters wrote: > I tried that as well and it simply results in an error stating "Could not > find command: c:/program". > > On Monday, December 7, 2020 at 2:06:53

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

2020-12-08 Thread Michael Watters
e --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 puppet runs. Here is the definition of > the reso

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

2020-12-08 Thread Michael Watters
Probably need to quote the executable due to spaces: exec { '"c:/program files/telegraf/telegraf.exe" --service install': Looks like that worked. Thanks for the help. On Tuesday, December 8, 2020 at 1:58:12 PM UTC-5 Josh Cooper wrote: > On Tue, Dec 8, 2020 at 10:37 AM Michael W