https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • t

    tuxmea

    10/16/2025, 6:37 AM
    technically you can do this. but it is complicated, as you always must ensure that both classes are within node classification. i always prefer to not do it this way.
  • m

    Moe

    10/16/2025, 6:47 AM
    How would this look like?
  • s

    smortex

    10/16/2025, 6:58 AM
    In YAML,
    notify: Service['httpd']
    means that
    notify
    is the string "Service['httpd']", not what you want. You can probably model something with https://www.puppet.com/docs/puppet/7/lang_data_resource_type#lang_data_resource_type_resource_type
  • k

    kenyon

    10/16/2025, 7:02 AM
    @Moe try removing the single quotation marks, so
    Service[httpd]
    . that’s how it would look in the catalog, which you can see with
    sudo jq --color-output . $(sudo puppet config print client_datadir)/catalog/$(sudo puppet config print certname).json | less
    😲 1
  • m

    Moe

    10/16/2025, 7:10 AM
    The winner is @kenyon! 🎉 That actually did the trick
    Copy code
    [...].pem]/content: content changed '{sha256}c4a4ffd8c2ce9f342476f535be012fa7c68dadeecf75212d3189d8e4fdc73b27' to '{sha256}90fd93d27062ff313fff57258322e7f7cc906465cb1f76d96118227e9596d24f' (corrective)
    [...]
    Scheduling refresh of Service[httpd]
    dead yes 1
  • m

    Moe

    10/16/2025, 7:13 AM
    I wonder: is the single quotes actually mandatory? I need to keep looking at the docs and see what the style guide says probably. I have seen this in our environment before but most of the time things are quoted. For example something like
    file { "${cms_install_params[catalina_base]}/conf/${facts[networking][hostname]}.keystore":
    which is something I just found
  • k

    kenyon

    10/16/2025, 7:15 AM
    when you’re writing in the puppet language, it doesn’t matter how you quote the string, it gets run through the puppet compiler. but I think when it’s in hiera, the literal string in YAML is used in the catalog.
    👍 1
  • m

    Moe

    10/16/2025, 7:17 AM
    Ok, makes sense. In my initial post I actually forgot to paste the correct clipboard – it did have
    "Service['httpd']"
    but that didn't work either which confused me. But it was 11 PM when I tried that so… 😅
  • k

    kenyon

    10/16/2025, 7:18 AM
    as far as puppet language style,
    Service['httpd']
    is correct. also this is one reason why I would try to avoid doing resource creation in hiera for the most part.
  • m

    Moe

    10/16/2025, 7:26 AM
    Yes, I agree and can see why you shouldn't do this. In this very case it's a generic "put my certs here" with a bunch of stuff around it. Now I got asked to add a notify thingy and well here we are. Usually I defer this to the service class in the module itself. Fun fact: I just re-tested this and in Hiera you can't do
    Copy code
    notify: "Service['httpd']"
    this throws the error
    Could not find resource 'Service['httpd']' in parameter 'notify'
    . Which probably can also be explained. But removing the single quotes solves it so I'm somewhat glad now 😄
  • b

    Brian Schonecker

    10/16/2025, 2:58 PM
    Good 10:58 EDT. I'm running 'bundle exec rake parallel_spec' and I'm getting output like this: What command do I need to run to see the individual tests being run? As you can see there's all kinds of stuff erroring out and I'd like to get a more verbose output as the tests are running. Thank you.
  • b

    bastelfreak

    10/16/2025, 2:59 PM
    bundle exec rake spec
    should work
  • b

    Brian Schonecker

    10/16/2025, 2:59 PM
    I'm still getting the same "........................." output as the tests run.
  • b

    bastelfreak

    10/16/2025, 2:59 PM
    or
    bundle exec rspec spec/foo/bla_spec.rb
  • b

    bastelfreak

    10/16/2025, 3:00 PM
    mhm I think the format is hardcoded to progress (which are those dots)
  • b

    bastelfreak

    10/16/2025, 3:00 PM
    but there's a summary of all failures after the test is done
  • b

    Brian Schonecker

    10/16/2025, 3:01 PM
    Is there a 'fail fast' option? I've tried --fail-fast but that's not an option.
  • b

    Brian Schonecker

    10/16/2025, 3:02 PM
    I'm trying to submit a pull request to puppet-chrony but my tests are failing and it's taking 2 minutes to run the tests before the errors are displayed.
  • b

    bastelfreak

    10/16/2025, 3:02 PM
    you can always abort it and then it will print all the failures that already happened
  • b

    Brian Schonecker

    10/16/2025, 3:25 PM
    Thank you.
  • b

    Brian Schonecker

    10/16/2025, 3:35 PM
    Here is my puppet-chrony pull request for a feature request (manage /etc/sysconfig/chronyd on RHEL family). I got all kinds of errors about "memoized helper". I tried to re-paramater-itize the spec file but there wasn't anything I could do to fix the rubocop warning. I was forced to put in the absolutepath to the /etc/sysconfig/chronyd file (part of the pull request). Can anyone recommend a change that will pass the rubocop checks AND eliminate the hard coding of the path I had to do in ./spec/classes/chrony_spec.rb?
    b
    • 2
    • 12
  • g

    gary

    10/17/2025, 7:49 AM
    Will there be a new release of stdlib anytime soon? Running into the
    has_ip_address()/has_ip_network()
    issue and would just like to use a released version vs git
  • t

    tuxmea

    10/17/2025, 10:20 AM
    Kind reminder for next week: Wednesday, October 22nd 2025: https://puppet.run Event in Hamburg, Germany. Talks will be done in English, unluckily no recording. You can use our Voucher Code “betadotsFREE” to get a ticket without costs. I am talking about different ways to test Puppet DSL code, Robert will talk about containers in Puppet development and Lennart will run a demo on automating icinga2. Besides this there will be presentations on Puppet Edge (a new feature in Puppet Core) , automating NIS2 compliance and managing systems in distributed infrastructure.
  • b

    bastelfreak

    10/17/2025, 12:36 PM
    @Lukas Audzevicius hey, any chance you can merge https://github.com/puppetlabs/forge-ruby/pull/129 or point some people at it?
    l
    • 2
    • 1
  • j

    josh

    10/17/2025, 4:33 PM
    Hi folks, we've backported facter 4.15 to the public repo: https://github.com/puppetlabs/facter/pull/2795 It includes all changes from private facter except automation relating to puppetcore.
    👏 5
    👏🏻 1
    🙌 2
    b
    • 2
    • 2
  • s

    smortex

    10/18/2025, 7:07 AM
    @josh maybe related: puppetserver-ca 2.7.1 was released to rubygems.org (https://rubygems.org/gems/puppetserver-ca/versions/2.7.1) on July 10th, but the repo was not updated since Feb 8th… 2024 (date of the release of version 2.7.0). I saw that unexpectedly working on the legacy Puppet ports on FreeBSD, not a big deal for me, just so that you are aware 😉.
  • t

    tuxmea

    10/18/2025, 7:42 AM
    Maybe from the private fork and it was forgotten to push the changes to the public repo?
  • r

    redat

    10/20/2025, 2:32 PM
    Hi everyone ! Since doing the following :
    Copy code
    if defined(Class['my_super_class']) {
         class { 'my_other_super_class': }
      }
    Might result in an issue if the ordering in Puppet is not at our advantage, how would do the same thing ? I want to include a class, only if another class is already present.
  • b

    bastelfreak

    10/20/2025, 2:41 PM
    Why?
  • b

    bastelfreak

    10/20/2025, 2:42 PM
    That looks like an anti pattern
1...424425426427428Latest