[Puppet Users] Re: [Puppet-dev] Availability of Facter 4 nightly gems

2021-05-20 Thread David Schmitt
Are these also fed into the nightly agent builds, or do I need additional steps to get nightly facter on top of a nightly agent build? On Thu, 20 May 2021 at 13:40, Gabriel Nagy wrote: > Hello, > > We are happy to announce that Facter 4 nightly gems are now available to > use under

Re: [Puppet Users] Re: rspec, trusted facts, and node facts

2021-03-26 Thread David Schmitt
Did you see https://rspec-puppet.com/ ? On Thu, 25 Mar 2021 at 18:00, nand...@gmail.com wrote: > Hi all , > I have started my rspec code to test modules for unit testing .as there is > no good document to start with , Can you share some of your rspec code > testing the modules using rspec and

Re: [Puppet Users] Re: [INFO, maybe ACTION] r10k Feature Proposal

2021-03-18 Thread David Schmitt
The PDK by default is ignoring all of those directories ( https://github.com/puppetlabs/pdk-templates/blob/7be43a3903e798ae72095379ed3f8d9187416ff2/config_defaults.yml#L47-L65) when building modules. On Tue, 16 Mar 2021 at 23:07, Corey Osman wrote: > Why stop at the spec directory? Ignore all

Re: [Puppet Users] Transaction style resources

2020-11-11 Thread David Schmitt
The Palo Alto module is a good example for talking to an API. It also contains panos_commit which activates all collected config changes that were already uploaded to the

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

2020-06-25 Thread David Schmitt
For automatic installation from upstream sources. the module reaches out to https://apt.dockerproject.org/ to retrieve the repo keys. Please make sure that is accessible to your puppet agent. If that is not possible in your organisation, please follow the documentation to find the overrides to

Re: [Puppet Users] Install software by running script

2020-04-14 Thread David Schmitt
To answer the original question: when a software vendor delivers software that does not conform to your distributions native packaging format, invest some time in the excellent FPM tool that can build native packages for your local environment. Injecting the

Re: [Puppet Users] Puppet Resource Api and attributes 'behaviour: :parameter'

2020-02-24 Thread David Schmitt
Hi Fred, I'm sorry to say that this kind of behaviour is the topic of an open feature request: https://github.com/puppetlabs/puppet-resource_api/issues/225 I've added a link to this conversation there, to record the need for this. Until this gets implemented, you can try your hand at the "nasty

Re: [Puppet Users] Github actions for Puppet module deploy

2019-12-13 Thread David Schmitt
* The content team (which I'm am part of) is currently supercharging a lot of our processes through github actions, so expect some development from us in the next weeks. Cheers, David Schmitt On Thu, 12 Dec 2019 at 12:17, Thomas Bendler wrote: > Hi @all, > > are there any official Githu

Re: [Puppet Users] Optional / mutually exclusive resource parameters with the Puppet Resource API

2019-12-04 Thread David Schmitt
Hi Ben, to avoid having server-side code, the Resource API doesn't have a way to validate complex restrictions like this at compile time. You can either collapse this into a single attribute of type `Variant[Boolean, String]` or adding the validation in the provider at the time

Re: [Puppet Users] service resource running always makes a corrective change

2019-11-06 Thread David Schmitt
As far as I can tell from here, the process that's supposed to be running (rpc.nfsd) is not running and systemd therefore says the service is not running (Active: active (exited)). A running service would be Active: active (running) and showing the processes in the CGroup section. On Wed, 6 Nov

Re: [Puppet Users] Puppet Resource API - provider get method

2019-10-28 Thread David Schmitt
Hi Axton, this is a long-standing issue with how puppet resources are implemented. Adding path name vars like you did is one of the work arounds with the least issues. if. you add title patterns, it can be actually quite nice to use, say, defining for example "/etc/some.conf#key" for the "key"

Re: [Puppet Users] puppet catalog find --terminus json on puppet master

2019-09-18 Thread David Schmitt
On Tue, 17 Sep 2019 at 14:13, Matt Zagrabelny wrote: > Hey David, > > Thanks for the reply! > > On Tue, Sep 17, 2019 at 5:58 AM David Schmitt > wrote: > >> The most recent releases of puppetserver have an API endpoint >> specifically designed for this us

Re: [Puppet Users] puppet catalog find --terminus json on puppet master

2019-09-17 Thread David Schmitt
The most recent releases of puppetserver have an API endpoint specifically designed for this usecase: https://puppet.com/docs/puppetserver/latest/puppet-api/v4/catalog.html You'll also need to enable access to that endpoint in auth.conf for the server you want to access that API from. You can

Re: [Puppet Users] Bolt needs /opt/puppetlabs, but does not exist on debian buster

2019-08-27 Thread David Schmitt
"puppet" is the debian-native packaging. to get the puppetlabs packaging, install `puppet-agent`. You'll also want to use the puppet6 - not the puppet5 - release train, to get all the new stuff. Cheers, David On Tue, 27 Aug 2019 at 11:07, 'Christoph Myself' via Puppet Users <

Re: [Puppet Users] switching from source => "puppet:/// to source => "file:///

2019-06-14 Thread David Schmitt
On Fri, 14 Jun 2019 at 08:45, Locke Hajo wrote: > Hello, > > I suspect that you're misunderstanding something about how Puppet works, >> because as far as I can tell, you're trying to copy >> /etc/apache2/conf.d/testpuppet.conf to /etc/apache2/conf.d/testpuppet.conf. >> (The same path) >> >> yes

Re: [Puppet Users] apt::key and basic auth

2019-04-02 Thread David Schmitt
Hi Douglas, thanks for identifying the issue! Please submit a PR to the apt repo , someone from the Modules Team will pick it up. Regards, David On Mon, Apr 1, 2019 at 8:44 PM Douglas K. Rand wrote: > On 3/31/19 10:37 AM, Martin Alfke wrote:>> On

Re: [Puppet Users] Custom type: Ensure array properties are sorted

2019-03-15 Thread David Schmitt
On Fri, Mar 15, 2019 at 10:35 AM Dirk Heinrichs wrote: > Am Freitag, den 15.03.2019, 09:47 + schrieb David Schmitt: > > If you use the Resource API (official docs: > https://puppet.com/docs/puppet/6.3/custom_resources.html > <https://urldefense.proofpoint.

Re: [Puppet Users] Custom type: Ensure array properties are sorted

2019-03-15 Thread David Schmitt
If you use the Resource API (official docs: https://puppet.com/docs/puppet/6.3/custom_resources.html, github: https://github.com/puppetlabs/puppet-resource_api ), adding a canonical internal representation is as easy as adding the `canonicalize` feature, and define the required change on the

Re: [Puppet Users] Re: Puppet dumped multiple 1G files into folder after reboot

2019-02-25 Thread David Schmitt
Stephen, apologies for the late response - I've been out sick last week. I've poked around a bit in old bug reports and the only thing I could find is https://tickets.puppetlabs.com/browse/PDB-1812 , which says that PuppetDB 3.0.2 fixed an issue with autovaccuming that was not properly garbage

Re: [Puppet Users] Writing a non-ensurable type/provider

2019-02-25 Thread David Schmitt
Hi Dirk, this is possible using the Resource API , and instead of using the `set` method

Re: [Puppet Users] Puppet dumped multiple 1G files into folder after reboot

2019-02-19 Thread David Schmitt
Hi Stephen, while I can't say anything about what might have caused your issues in the first place, I can say with high confidence that the files you're seeing there *are* part of a postgresql database, and deleting them straight up will destroy something. To figure out what that "something" is,

Re: [Puppet Users] Run Exec command only if the file changes -puppet 3.8.6

2019-02-11 Thread David Schmitt
Hi, look into the "refreshonly" parameter on exec. Regards, David On Mon, 11 Feb 2019, 23:34 , wrote: > Hello, > > I am relatively new to puppet and i am looking to see if there's any way > to execute a command if a particular file has been changed on github source > ? > > Thanks ! > > -- >

Re: [Puppet Users] PDK on bionic Ubuntu

2019-01-28 Thread David Schmitt
t; gems['win32-service'] = ['0.8.8', require: false] > end > > gems.each do |gem_name, gem_params| > gem gem_name, *gem_params > end > > # Evaluate Gemfile.local and ~/.gemfile if they exist > extra_gemfiles = [ > "#{__FILE__}.local", > File.join(Dir.home, '.gemfi

Re: [Puppet Users] PDK on bionic Ubuntu

2019-01-28 Thread David Schmitt
run' > pdk (DEBUG): > /opt/puppetlabs/pdk/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/pdk-1.8.0/lib/pdk/cli.rb:18:in > `run' > pdk (DEBUG): > /opt/puppetlabs/pdk/private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/pdk-1.8.0/exe/pdk:6:in > `' > pdk (DEBUG): /opt/puppetlabs/pdk/private/ruby/2.4.4/bi

Re: [Puppet Users] PDK on bionic Ubuntu

2019-01-28 Thread David Schmitt
Hi Peter, is the module compatible to the PDK? That is, have you created the module with the PDK, and/or ran `pdk convert`/`pdk update` successfully on it? If no, please do so before trying to run any other PDK commands in a module. If yes, please capture the full output of the command you're

Re: [Puppet Users] serving per-node private data in puppet 5

2018-11-16 Thread David Schmitt
Hi Matt, I've not tried it myself, but https://puppet.com/docs/puppetserver/5.3/config_file_auth.html#hocon-example with a `match-request` selecting the hostname and a backreference in the `allow` section seems the new way to do this. Cheers, David On Thu, Nov 15, 2018 at 9:44 PM Matt

Re: [Puppet Users] Using variable for user password hash causes password updated each run.

2018-10-19 Thread David Schmitt
Check if the output of your script actually matches *exactly* the hash that gets written into the user. Whitespace, even a new line at the end, might confuse puppet here. If that's the problem, use https://forge.puppet.com/puppetlabs/stdlib#strip to fix that. Cheers, DavidS On Thu, Oct 18, 2018

Re: [Puppet Users] pip package provider on Redhat

2018-10-19 Thread David Schmitt
To answer your original question: no, there is no way to override the ruby code without modifying the ruby code. On Thu, Oct 18, 2018 at 7:41 PM Sergei Gerasenko wrote: > > Yeah, I know we're old. I'm asking in general though (imagining it would > be happening with the current version for

Re: [Puppet Users] Re: Apache module + Ubuntu 18.04 + mpm prefork breaks PHP version

2018-10-19 Thread David Schmitt
Hi comport3, would you be interested to contribute this change to the main apache module for the benefit of everyone? If you never have contributed to a public module before check out David Swan's talk from Puppetize Live:

Re: [Puppet Users] Puppet 6 removed native Nagios provider

2018-10-19 Thread David Schmitt
Also see https://puppet.com/docs/puppet/6.0/type.html#deprecated-types for a complete list and https://puppet.com/docs/puppet/6.0/release_notes.html#new-features-and-improvements-1 for some background. Cheers, David On Fri, Oct 19, 2018 at 6:49 AM Angel L. Mateo wrote: > > El 19/10/18 a las

[Puppet Users] [ANN] Resource API v1.6.0 Release

2018-09-25 Thread David Schmitt
a-ar/hue_rsapi> or the Palo Alto firewall module <https://github.com/puppetlabs/puppetlabs-panos>. Please let us know of your experiences with the Resource API, either here, on Slack <https://slack.puppet.com/> (#forge-modules), or on the github repo <https://github.com/puppetlabs

Re: [Puppet Users] Custom type and provider

2018-09-24 Thread David Schmitt
omelin wrote: > Hi David Schmitt, > > I create de new module, class and provider with pdk the according this > site puppet. My puppet is version 'puppet --version . 5.5.6'. > > But, the return error: *Could not autoload puppet/type/foo: no such file > to load -- puppet/re

Re: [Puppet Users] Custom type and provider

2018-09-22 Thread David Schmitt
Hi Rafael, if you are just starting out with this, I'd highly recommend looking into the Resource API. It makes the development of types much easier, is a supported part of this week's puppet 6 release, and available as a separate download for previous puppet versions. The PDK also has support

[Puppet Users] rake module:push, puppet-blacksmith, and puppet 6

2018-09-19 Thread David Schmitt
Hi folks, until tomorrow's PDK and puppetlabs_spec_helper release automated module release jobs will need to have their puppet pinned to `~> 5.0`, to keep using the deprecated `puppet module build` command, which was removed in yesterday's puppet 6.0.0 release. You can follow along PDK-1100

[Puppet Users] [ANN] Resource API v1.5.0 Release

2018-09-13 Thread David Schmitt
r/hue_rsapi> or this experimental apt_key provider <https://github.com/DavidS/puppetlabs-apt/blob/resource-api-experiments/lib/puppet/provider/apt_key2/apt_key2.rb> . Please let us know of your experiences with the Resource API, either here, on Slack <https://slack.puppet.com/> (#f

[Puppet Users] [ANN] Resource API v1.4.2 Release

2018-08-09 Thread David Schmitt
Hi all, We're pleased to announce that version 1.4.2 of the Resource API is being released today. The Resource API provides a simple way to create new native resources in the form of types and providers for Puppet. Using a little bit of ruby, you can finally get rid of that brittle exec, or

[Puppet Users] [ANN] Resource API v1.4.1 Release

2018-07-20 Thread David Schmitt
Hi all, We're pleased to announce that version 1.4.1 of the Resource API is being released today. The Resource API provides a simple way to create new native resources in the form of types and providers for Puppet. Using a little bit of ruby, you can finally get rid of that brittle exec, or

[Puppet Users] [ANN] Resource API v1.4.0 Release

2018-06-20 Thread David Schmitt
Please let us know of your experiences with the Resource API, either here, on Slack <https://slack.puppet.com/> (#forge-modules), or on the github repo <https://github.com/puppetlabs/puppet-resource_api>. Thanks, David Schmitt & David Armstrong -- Cheers, David https://twitter.co

Re: [Puppet Users] How to get Simplecov to report coverage correctly for puppet manifests

2018-06-19 Thread David Schmitt
On Mon, Jun 18, 2018 at 11:03 AM Darragh Bailey wrote: > > > > > On Mon, 18 Jun 2018, 09:19 David Schmitt, > wrote: > >> Hi Darragh, >> >> SimpleCov is a ruby-only solution and the puppet code (*.pp) coverage >> from rspec-puppet do

Re: [Puppet Users] How to get Simplecov to report coverage correctly for puppet manifests

2018-06-18 Thread David Schmitt
Hi Darragh, SimpleCov is a ruby-only solution and the puppet code (*.pp) coverage from rspec-puppet does not integrate into it. As far as I can see there is currently no way to get at the raw data without hacking rspec-puppet itself

Re: [Puppet Users] Exec type and backgrounded processes

2018-05-22 Thread David Schmitt
That is not surprising to me. To provide maximal flexibility, puppet does not do any management or cleanup of processes started. As an exercise, try to define a parameter to exec that specifies how puppet should cleanup processes after exec: as soon as the exec returns? when the agent run ends?

Re: [Puppet Users] Help on puppet (multiple class in single manifest)

2018-05-10 Thread David Schmitt
* "puppet module generate" is deprecated and does not provide you with the full set of tools and practices you could be using. Have a look at the PDK instead. * All the classes in a module need to have the module name as base name. i.e. when your module

[Puppet Users] [ANN] Resource API v1.2 Release

2018-05-08 Thread David Schmitt
Hi all, We're pleased to announce that version 1.2 of the Resource API is being released today. The Resource API provides a simple way to create new native resources in the form of types and providers for Puppet. It is provided as a Ruby gem to be referenced within modules. Support for it has

Re: [Puppet Users] puppet-rspec - external modules? use vendored instead of download?

2018-05-08 Thread David Schmitt
You can (temporarily) use symlinks to a manually maintained cache to work around this. For a more complete fix, see PDK-636 , which is currently in progress. Cheers, David On

[Puppet Users] [ANN] Resource API v1.1 Release

2018-04-13 Thread David Schmitt
Hi all, We're pleased to announce that version 1.1 of the Resource API has been released yesterday. The Resource API provides a simple way to create new native resources in the form of types and providers for Puppet. It is provided as a Ruby gem to be referenced within modules. Support for it

Re: [Puppet Users] Detection of appropriate 'service' provider

2018-03-29 Thread David Schmitt
[Apologies for the double post] The other option is to add Gentoo to the list of defaultfor's at https://github.com/puppetlabs/puppet/blob/0d5b6618b3a9a376625e5df86c349e1df2d88190/lib/puppet/provider/service/systemd.rb#L21 Cheers, David On Thu, Mar 29, 2018 at 9:08 AM David Schmitt <david.s

Re: [Puppet Users] Detection of appropriate 'service' provider

2018-03-29 Thread David Schmitt
You can find the init provider here . Apparently it is very unconstrained, and therefore puppet prefers it over the systemd provider. It should be easy enough to change

Re: [Puppet Users] Detection of appropriate 'service' provider

2018-03-28 Thread David Schmitt
Look at the agent's --debug output. In the preamble there is a section on how providers get selected. Cheers, David On Tue, Mar 27, 2018 at 7:17 PM Dave F wrote: > I'm using puppet to look after a mix of raspbian and gentoo OS's. This is > going pretty well so far - but

Re: [Puppet Users] Updated manifest, now get Failed to apply catalog: "\xF8\xDD" on UTF-16LE on Windows

2018-03-27 Thread David Schmitt
Hi, try an advanced text editor like https://code.visualstudio.com/ or https://notepad-plus-plus.org/ which displays the encoding of the files. That way you can identify and fix the one that is off (not in UTF-8). VSCode is also maintained and has a puppet plugin

[Puppet Users] Announcement: Resource API v1.0 release

2018-03-23 Thread David Schmitt
Hi all, We're pleased to announce that version 1.0 of the Resource API is being launched today. The Resource API provides a simple way to create new native resources in the form of types and providers for Puppet. It is provided as a Ruby gem to

Re: [Puppet Users] Re: rspec testing a custom puppet provider that has a parent

2018-03-23 Thread David Schmitt
On Thu, Mar 22, 2018 at 1:38 PM Bill Sirinek wrote: > My *type *file calls Puppet::Type.newtype() as you suggest, but the code > snippet you were referring to was for my *provider*, so I think > Puppet::Type.type(:myapp_config).provide > > is correct here. The type/provider

Re: [Puppet Users] rspec testing a custom puppet provider that has a parent

2018-03-22 Thread David Schmitt
Hi Bill, On Wed, Mar 21, 2018 at 1:57 PM Bill Sirinek wrote: > I am trying to write an rspec test for a custom type and provider I wrote > and having issues. > > The custom type has a provider that manages an ini file. Because I already > have puppetlabs/inifile, I made this

Re: [Puppet Users] unit tests failing on augeas resources in defined type

2018-02-26 Thread David Schmitt
--- > concat_basedir: "/tmp" > ipaddress: "172.16.254.254" > is_pe: false > is_prod: false > macaddress: "AA:AA:AA:AA:AA:AA" > > > Here is my custom spec/default_module_facts.yml: > > --- > architecture: "i86pc" > hardwaremodels

Re: [Puppet Users] unit tests failing on augeas resources in defined type

2018-02-26 Thread David Schmitt
Hi Bill, from the code snippets you posted, nothing should be trying to initialize SSL (and thus causing this issue). Can you post the entire module somewhere for inspection? specifically your spec_helper.rb would be of interest. If you can't post it publicly, you can send a copy to

Re: [Puppet Users] Puppet 5 tests of forked module gives errors

2018-02-20 Thread David Schmitt
use I can't get the isolation to do anything. > On Monday, February 19, 2018 at 7:51:24 AM UTC-5, David Schmitt wrote: > >> Have a look at >> https://puppet.com/docs/puppet/5.3/environment_isolation.html#generate-types >> and the surrounding docs. >> >> On Fri, Feb

Re: [Puppet Users] Rspec-puppet: left match operand must result in a string

2018-02-19 Thread David Schmitt
Hi Anthony, the file with the error should be your own `manifests/init.pp`, the path is just weird because of the additional setup required for the tests. Cheers, David On Sat, Feb 3, 2018 at 2:33 AM Anthony Scudese wrote: > Hey, > > Unfortunately it seems to be a file

Re: [Puppet Users] Puppet 5 tests of forked module gives errors

2018-02-19 Thread David Schmitt
Have a look at https://puppet.com/docs/puppet/5.3/environment_isolation.html#generate-types and the surrounding docs. On Fri, Feb 16, 2018 at 8:42 PM jmp242 wrote: > So I originally conflated 2 different issues, and the one was fixed with > the bugfix referenced in my

Re: [Puppet Users] How to access a module fact?

2018-01-24 Thread David Schmitt
Facts are accessed as either global variables, $appdynamics_installed, or using the facts hash: https://puppet.com/docs/puppet/5.3/lang_facts_and_builtin_vars.html#the-factsfactname-hash Cheers, David On Tue, Jan 23, 2018 at 6:05 PM dkoleary wrote: > Hi; > > I'm

Re: [Puppet Users] Managing puppet module

2018-01-02 Thread David Schmitt
Hi Albert, On Tue, Dec 26, 2017 at 11:22 AM Albert Shih <albert.s...@obspm.fr> wrote: > Le 14/12/2017 à 08:50:38+0000, David Schmitt a écrit > Hi, > > Really sorry for not answering you sooner. > > > > > I tested this quickly on my system and it seems to wo

Re: [Puppet Users] NoMethodError: undefined method `initialize_for_puppet'

2017-12-19 Thread David Schmitt
If you really need the no longer maintained puppet 3, you'll have a better time if you go back to one of the ruby versions supported by it, and make sure that you get gem versions that were current back then. On Mon, Dec 18, 2017 at 2:40 PM Steve R wrote: > hello, > >

Re: [Puppet Users] Managing puppet module

2017-12-14 Thread David Schmitt
Hi Albert, I tested this quickly on my system and it seems to work fine here. Can you share more details (puppet version, other installed modules) of your system? Cheers, David Puppet 3: david@davids:~/git/tmp/foo$ bundle exec puppet module install puppetlabs-apt --version 2.4.0 Notice:

Re: [Puppet Users] pdk and puppetlabs-ntp Gemfile on non-windows?

2017-10-31 Thread David Schmitt
shuffled around. > > On Tue, Oct 31, 2017 at 02:22:47PM +, David Schmitt wrote: > >Hi Christopher, > > > >I'm running the xenial packages on Debian testing myself, and have no > >issues with running the pdk validation of the puppetlabs-ntp module. > I

Re: [Puppet Users] pdk and puppetlabs-ntp Gemfile on non-windows?

2017-10-31 Thread David Schmitt
Hi Christopher, I'm running the xenial packages on Debian testing myself, and have no issues with running the pdk validation of the puppetlabs-ntp module. If I use the Gemfile.lock from your log instead of a clean one, I get the same error. Please remove the Gemfile.lock and try again. Cheers,

Re: [Puppet Users] Forge repository timeout

2017-10-12 Thread David Schmitt
Hi Raphaël, please use the API v3 (described at https://forgeapi.puppetlabs.com/) to programmatically access the forge. Using the pagination parameters (offset and limit) allows much faster and safer traversing of the results. With the increasing number of modules on the forge, I'm not sure we'll

Re: [Puppet Users] Confusing error with file resource...

2017-10-04 Thread David Schmitt
On Tue, Oct 3, 2017 at 5:41 PM Sean wrote: > Hi, > > I have a strange puppet error (v4.10.1) with a file resource that creates > a cron job... > > file { '/etc/cron.daily/aide': > ensure => $mymodule::ensure_aide, > owner => 'root', > group => 'root', >

Re: [Puppet Users] Question regarding Puppet4 class params and Hiera5

2017-09-27 Thread David Schmitt
rises I also recommend that you always run using --strict, so nobody can use the subclass standalone and then be surprised by it not working as intended. Cheers, David > > On Tuesday, September 26, 2017 at 12:13:42 PM UTC-4, David Schmitt wrote: >> >> >> >> On T

Re: [Puppet Users] Question regarding Puppet4 class params and Hiera5

2017-09-26 Thread David Schmitt
On Tue, Sep 26, 2017 at 4:01 PM Sean wrote: > Greetings, > > I have read searched and read several threads in the list regarding using > hiera, automatic lookup, and class params. Some of them, I'm thinking > relate to Puppet3 and prior, and I admit I'm struggling a bit

Re: [Puppet Users] profile template vs module template

2017-09-18 Thread David Schmitt
According to http://www.puppetmodule.info/modules/evenup-sssd/puppet_classes/sssd there is no way to pass in an override to the content of the file. You can hack it like this: include ::sssd File['/etc/sssd/sssd.conf'] { content => template('profile/sssd.conf.erb'), source => undef, }

Re: [Puppet Users] Re: [ANN] Puppet Development Kit (pdk) 1.0

2017-08-25 Thread David Schmitt
opy of it is shipped with the PDK packages, and used by default), but see PDK-447 <https://tickets.puppetlabs.com/browse/PDK-447> and PDK-448 <https://tickets.puppetlabs.com/browse/PDK-448> for some caveats. Cheers, David On Mon, 21 Aug 2017 at 09:57, David Schmitt <david.schm...@pupp

Re: [Puppet Users] Re: [ANN] Puppet Development Kit (pdk) 1.0

2017-08-21 Thread David Schmitt
Hi Charlie, thanks for trying out the PDK! On Mon, Aug 21, 2017 at 2:22 PM Charlie Derwent wrote: > Can I use the PDK to validate my Roles and Profiles? > The short answer is: Yes, you can. > Keep getting complaints that I'm not in a valid module (missng >

Re: [Puppet Users] Re: [ANN] Puppet Development Kit (pdk) 1.0

2017-08-18 Thread David Schmitt
A hot fix for this has been released at https://pm.puppetlabs.com/cgi-bin/pdk_download.cgi?dist=win=x64=1.0.1.0 ; and will be available on the download page Really Soon Now. On Wednesday, August 16, 2017 at 1:41:57 PM UTC+1, David Schmitt wrote: > > > > On 16 August 2017 at 13:06,

Re: [Puppet Users] PDK 1.0.0.1 on Windows

2017-08-17 Thread David Schmitt
> Finished in 8.33 seconds (files took 2.02 seconds to load) > 1 example, 1 failure > > Failed examples: > > rspec ./spec/defines/test_reduced_spec.rb:17 # rimcdm::test_reduced > Create Test environment should compile into a catalo > gue without dependency cycles >

Re: [Puppet Users] PDK 1.0.0.1 on Windows

2017-08-17 Thread David Schmitt
On 17 August 2017 at 12:11, Peter Faller wrote: > Hi David > > Thanks for pointing out 'pdk bundle' - it does provide what I was looking > for. It is however a bit noisy (but that's not a big deal): > > PS> pdk bundle exec -- rspec .\spec\classes\apg_base_spec.rb > . > >

Re: [Puppet Users] PDK 1.0.0.1 on Windows

2017-08-17 Thread David Schmitt
On 17 August 2017 at 07:12, Peter Faller wrote: > While trying to use the PDK on Windows (instead of using a Linux VM for > development), I've come across a few hitches: > > 1) 'rake' is not available as a command (it is accessible via >

Re: [Puppet Users] Re: [ANN] Puppet Development Kit (pdk) 1.0

2017-08-16 Thread David Schmitt
On 16 August 2017 at 13:06, Peter Faller wrote: > Seems to be a hitch with the Windows install on Windows 8.1: I installed > pdk-1.0.0.1-x64.msi; opened a new powershell window, and found that while > pdk works, the PATH is wrong: > > > modules> $env:path > C:\Program

Re: [Puppet Users] Puppet newbie question about facts and config files

2017-08-02 Thread David Schmitt
Hi, On 2 August 2017 at 16:15, RG wrote: > I am trying to write my first puppet module. > > I need to be able to pull a value from a custom fact and write a value in > a config file based on a value in the fact. > > Can I do and "if-then" statement like in bash? > Yes!

[Puppet Users] Re: [Puppet-dev] Re: Draft for new type and provider API

2017-03-07 Thread David Schmitt
[aologies, this got lost in my Drafts folder.] On 28 February 2017 at 19:35, Erik Dalén wrote: > Overall I think this looks pretty good, but I have some questions and > comments. > > For implementations that can't enumerate all existing resources (at least > not in

[Puppet Users] Re: [Puppet-dev] Re: Draft for new type and provider API

2017-02-28 Thread David Schmitt
On 27 February 2017 at 18:57, Shawn Ferry <shawn.fe...@oracle.com> wrote: > > On Feb 27, 2017, at 9:59 AM, David Schmitt <david.schm...@puppet.com> > wrote: > > Commands > > To use CLI commands in a safe and comfortable manner, the implementation > can use

[Puppet Users] Re: [Puppet-dev] Re: Draft for new type and provider API

2017-02-27 Thread David Schmitt
Hi folks, I've written down the design in README format now. This should make for a easier to ingest from a module developer's perspective. Meanwhile I've also had a shot at a hardcoded implementation of this, and it is technically possible to implement this too. --- Resource API A

[Puppet Users] Re: [Puppet-dev] Re: Draft for new type and provider API

2017-02-08 Thread David Schmitt
On 7 February 2017 at 17:13, jcbollinger <john.bollin...@stjude.org> wrote: > > > On Tuesday, January 31, 2017 at 10:04:27 AM UTC-6, David Schmitt wrote: >> >> >> The type and provider API has been the bane of my existence since I >> [started writi

[Puppet Users] Re: [Puppet-dev] Re: Draft for new type and provider API

2017-02-07 Thread David Schmitt
one possible reading, types are already are a extension point of the DSL, and this proposal makes that less painful, and easier to reason about. Cheers, David PS: If anyone is at ConfigurationManagementCamp in Gent these days, hit me up to talk about this! > > - thomas > > > On Tue, Feb 7, 201

[Puppet Users] Re: [Puppet-dev] Re: Draft for new type and provider API

2017-02-07 Thread David Schmitt
switch immediately, but I do hope that the new API makes implementations so much easier that people will switch quickly. Then it will be a matter of filling in the gaps for the special cases. Cheers, David S > > > Corey (NWOps) > > > > On Tuesday, January 31, 2017 at 8:0

[Puppet Users] Re: [Puppet-dev] Draft for new type and provider API

2017-02-03 Thread David Schmitt
On 3 February 2017 at 11:12, Martin Alfke wrote: > Hi David, > > many thanks for sharing your ideas. > > As you already know: personally I don’t say that types and providers are > way to difficult. > It is more a matter on how to explain them. > I will dig through your document

[Puppet Users] Re: [Puppet-dev] Draft for new type and provider API

2017-02-02 Thread David Schmitt
eye on this conversation though. > > Thanks, > Thanks for your time and work you're putting in here. David > > Trevor > > On Tue, Jan 31, 2017 at 11:04 AM, David Schmitt <david.schm...@puppet.com> > wrote: > >> Hi *, >> >> The type and provider

[Puppet Users] Draft for new type and provider API

2017-01-31 Thread David Schmitt
Hi *, The type and provider API has been the bane of my existence since I [started writing native resources]( https://github.com/DavidS/puppet-mysql-old/commit/d33c7aa10e3a4bd9e97e947c471ee3ed36e9d1e2). Now, finally, we'll do something about it. I'm currently working on designing a nicer API for

[Puppet Users] Re: Why i cant change my custom types?

2016-11-08 Thread David Schmitt
Another thing you might want to try is "puppet generate type", a experimental feature of puppet 4.6 onwards: https://docs.puppet.com/puppet/4.8/reference/environment_isolation.html Regards, David On Tuesday, November 8, 2016 at 12:31:07 PM UTC, Akai wrote: > > Hello David, > > thank you for

[Puppet Users] Re: Why i cant change my custom types?

2016-11-08 Thread David Schmitt
On Tuesday, November 8, 2016 at 10:58:58 AM UTC, Akai wrote: > It cant be the right way, to always reset everythng on a older snapshot > or? Why the puppetmaster "rembers" the custom_type definition and does not > accept changes? How i handle this? > Since custom types are native ruby code,

[Puppet Users] Re: Agent installation and status enforcement

2016-11-07 Thread David Schmitt
Hi Frank, there are a few ways in which agents can become non-functional (full disk, code error, OOM killer, mismatched incentives in the organization, etc), none of which can be fixed by the (now dysfunctional) agent. The common remediation is monitoring agent reports and investigating nodes

Re: [Puppet Users] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-02 Thread David Schmitt
ions - Puppetfile, metdata.json and .fixtures, Guess what is going to >> happen at some point ;-) >> >> Maybe I'm not aware of something, but there really should be a single >> canonical source of dependency requirements. >> >> -steve >> >> On Wednesday, Nov

Re: [Puppet Users] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-02 Thread David Schmitt
o > happen at some point ;-) > > Maybe I'm not aware of something, but there really should be a single > canonical source of dependency requirements. > > -steve > > On Wednesday, November 2, 2016 at 6:55:05 AM UTC-7, David Schmitt wrote: >> >> >> >>

Re: [Puppet Users] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-02 Thread David Schmitt
On Tuesday, November 1, 2016 at 7:25:01 PM UTC, Garrett Honeycutt wrote: > I noticed that your .fixtures.yml do not include versions. This means > that they will always test against the latest version. You probably want > to change this to use the version you actually use. > That really

[Puppet Users] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-01 Thread David Schmitt
this! David On Tuesday, November 1, 2016 at 10:12:21 AM UTC, David Schmitt wrote: > > Hi Steve, > > I can reproduce this locally, and it looks like some kind of setup issue > around how (rspec-)puppet is loading lookup data. > > I'll look into it, and keep you poste

[Puppet Users] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-01 Thread David Schmitt
Hi Steve, I can reproduce this locally, and it looks like some kind of setup issue around how (rspec-)puppet is loading lookup data. I'll look into it, and keep you posted. Regards, David On Monday, October 31, 2016 at 2:39:54 AM UTC, Stephen Nesbitt wrote: > > All: > > I'm struggling to unit

[Puppet Users] March in Modules

2016-04-08 Thread David Schmitt
Dear *, Here is a short summary of what happened in and around the Puppet Labs' modules in March. Releases of Supported Modules - puppetlabs/dsc 1.0.1: First supported release of the dsc module! Manage Windows PowerShell DSC (Desired State

[Puppet Users] rspec-puppet 2.4.0 released

2016-03-24 Thread David Schmitt
elping out on github for their contributions to this release. Cheers, David Schmitt PS: if you too want to help out, anything you can add to https://github.com/rodjek/rspec-puppet/tree/gh-pages to improve the online docs would be of great help! -- You received this message because you are

[Puppet Users] rspec-puppet 2.3.2

2016-01-26 Thread David Schmitt
Hi, over the weekend there was a situation where the newest puppet versions (3.8.5 and 4.3.2) would interact badly with the latest version of rspec-puppet (2.3.0). Yesterday I uploaded 2.3.1 to fix the issue with 3.8.5 and today there is 2.3.2 to completely fix this across all puppet versions.

[Puppet Users] rspec-puppet 2.3.0 released

2015-12-15 Thread David Schmitt
ded example spec - document the `scope` property ### Credits Thanks to Adrien Thebo, Alex Harvey, Brian, Dan Bode, Dominic Cleal, Javier Palacios, Jeff McCune, Jordan Moldow, Peter van Zetten, Raphaël Pinson, Simon Kohlmeyer, and Tristan Colgate for their contributions to this release. -- David

Re: [Puppet Users] Beaker and mock services

2015-10-22 Thread David Schmitt
On 22/10/2015 08:06, Alex Harvey wrote: On 21 October 2015 at 23:28, Gareth Rushgrove > wrote: On 20 October 2015 at 08:49, Alex Harvey > wrote: > Hi all, > >

Re: [Puppet Users] Re: Confine a custom fact by file existence

2015-10-22 Thread David Schmitt
On 22/10/2015 13:38, jcbollinger wrote: On Thursday, October 22, 2015 at 3:00:55 AM UTC-5, Thomas Müller wrote: Hi I know it's possible to confine a fact by other facts like "confine :operatingsystem => :Fedora". But i have a fact which requires a binary from a rpm package

Re: [Puppet Users] Re: how to write a loop to convert all erb files to regular file?

2015-10-21 Thread David Schmitt
On 21/10/2015 21:32, yi zhao wrote: Hi,David, thank you for the quick reply, I am new to resource type define so may need your help to troubleshoot: mycode: $db_setup_home = "${dbnamehome}/dbs/create_${dbname}" define rac_script($home, $source) { file {

  1   2   3   4   5   >