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

    natemccurdy

    01/19/2023, 7:25 PM
    Ah, here's that plugin I was thinking of: https://github.com/voxpupuli/puppet-lint-optional_default-check Its readme explains why the check is needed.
  • n

    natemccurdy

    01/19/2023, 7:25 PM
    Ah, here's that plugin I was thinking of: https://github.com/voxpupuli/puppet-lint-optional_default-check It's readme explains why the check is needed.
  • r

    rusty

    01/19/2023, 7:25 PM
    that is what I was looking for, so param is required, a default is commonly used, but non-defaults have a strict list of acceptable values
  • n

    natemccurdy

    01/19/2023, 7:26 PM
    Ah, here's that plugin I was thinking of: https://github.com/voxpupuli/puppet-lint-optional_default-check Its readme explains why the check is needed.
  • b

    bastelfreak

    01/19/2023, 7:27 PM
    We wrote some guidelines about parameters/datatypes at https://voxpupuli.org/docs/reviewing_pr/
  • n

    natemccurdy

    01/19/2023, 7:28 PM
    There's a puppet-lint plugin that checks for that (I'm not sure if that's a core check or not). So if you want the parameter to default to
    'thing1'
    , for example, I'd make the parameter definition be:
    Enum['thing1', 'thing2'] $param = 'thing1'
  • j

    Jerry Way

    01/19/2023, 7:47 PM
    Trying to refresh a possibly misplaced memory but, isn't there a command to add to "puppet agent -t" when you're running a feature branch into dev? Otherwise, when I run "puppet agent -t" it removes my feature files.
  • r

    rusty

    01/19/2023, 7:48 PM
    --environment <X>
    ?
  • r

    rusty

    01/19/2023, 7:49 PM
    where
    <X>
    is the branch you want to use?
  • j

    Jerry Way

    01/19/2023, 7:51 PM
    That does seem not only reasonable and makes sense. I'll give it a go.
  • p

    Paul Mekhedjian

    01/19/2023, 7:54 PM
    Real hard hitting, difficult question for you folks today. What word do you use for Puppet code that conforms to best Puppet practice? (like the word Pythonic for Python)
  • s

    Slackbot

    01/19/2023, 7:54 PM
    This message was deleted.
    😄 1
    c
    b
    +2
    • 5
    • 5
  • r

    redat

    01/19/2023, 8:25 PM
    Hi everyone ! Does anyone know where I can find a quite complex example of what a Puppet code base would look like ? (Like.. What the
    code/environments/production
    folder would like for a complex architecture) Thanks for your help!
  • s

    Slackbot

    01/19/2023, 8:29 PM
    This message was deleted.
    🙌 1
    r
    • 2
    • 1
  • n

    natemccurdy

    01/19/2023, 8:29 PM
    @redat The Wikimedia Puppet repo is a good example of a very active and very real, production code base: https://github.com/wikimedia/puppet
  • s

    Slackbot

    01/19/2023, 9:07 PM
    This message was deleted.
    c
    l
    • 3
    • 3
  • s

    Slackbot

    01/19/2023, 9:56 PM
    This message was deleted.
    p
    a
    • 3
    • 4
  • a

    Andy Fry

    01/19/2023, 10:04 PM
    Yep, I just answered my own question as I was writing it lol. Tried again using the genuine hostname as the certname and adding the cnames to the san and that seems to have worked. Thanks
  • k

    Karol ZajÄ…c

    01/20/2023, 10:41 AM
    Hello according https://stackoverflow.com/questions/19013084/in-puppet-how-can-i-access-a-variable-attribute-inside-a-defined-type
    It doesn't seem that you can access a defined type's attributes.
    do you know if it still apply (its from 8 years ago 😞 )
  • s

    Slackbot

    01/20/2023, 10:41 AM
    This message was deleted.
    c
    k
    c
    • 4
    • 22
  • k

    Karol ZajÄ…c

    01/20/2023, 10:49 AM
    message has been deleted
  • c

    cruelsmith

    01/20/2023, 10:56 AM
    Can you maybe achive this one on filesystem basis like using
    .d/*
    definitions?
  • c

    cruelsmith

    01/20/2023, 10:58 AM
    Or try this to get from the hiera level. You can collect all keys of an hash that created your
    consul::configs
  • s

    Slackbot

    01/20/2023, 2:53 PM
    This message was deleted.
    j
    j
    l
    • 4
    • 3
  • j

    jfreymann

    01/20/2023, 2:54 PM
    I feel like this was asked here before but I can't find it anywhere. Running puppet ssl bootstrap on an agent node appends a "dot" to the end of the cert,
    server01..pem
    - I don't control the network this server resized in, I'm assuming this is a byproduct of said network. is there a way around this? That dot is causing issues with the post request to the master.
    Copy code
    Debug: HTTP PUT <https://puppet:8140/puppet-ca/v1/certificate_request/server01>. returned 400 Bad Request
  • j

    jfreymann

    01/20/2023, 2:55 PM
    I feel like this was asked here before but I can't find it anywhere. Running puppet ssl bootstrap on an agent node appends a "dot" to the end of the cert,
    server01..pem
    - I don't control the network this server resides in, I'm assuming this is a byproduct of said network. is there a way around this? That dot is causing issues with the post request to the master.
    Copy code
    Debug: HTTP PUT <https://puppet:8140/puppet-ca/v1/certificate_request/server01>. returned 400 Bad Request
  • b

    Brian Schonecker

    01/20/2023, 3:25 PM
    At the risk of exposing my lack of skills once again: I'm trying to set up some local spec testing on a RHEL8 system. I'm using puppet-cron module and have (I think) installed the necessary stuff for spec testing. I typed "rake spec" and I expected something to happen but "rake spec" returned almost immediately with no output. I tried doing "pdk test" (or something like that) and it barked at me about upgrading the spec test files (which I did) and then the tests ran -- mostly successfully -- after about 40 seconds. Is "rake spec" the command I should be using? I'm coming at this with zero experience with testing and I need to be able to do the testing via a Jenkins pipeline. I don't understand why or what I'm doing yet and I'd just like to get tests kicked off even though I can't write any tests for myself yet. All I want to do for now is to get a linux server running to do the tests. Any advice is appreciated.
  • d

    Dr Bunsen Honeydew

    01/20/2023, 3:25 PM
    See the
    puppet-cron
    module at https://forge.puppet.com/puppet/cron?src=slack&amp;channel=puppet
  • b

    Brian Schonecker

    01/20/2023, 3:26 PM
    At the risk of exposing my lack of skills once again: I'm trying to set up some local spec testing on a RHEL8 system. I'm using puppet-cron module and have (I think) installed the necessary stuff for spec testing. I typed "rake spec" and I expected something to happen but "rake spec" returned almost immediately with no output. I tried doing "pdk test" (or something like that) and it barked at me about upgrading the spec test files (which I did) and then the tests ran -- mostly successfully -- after about 40 seconds. Is "rake spec" the command I should be using? I'm coming at this with zero experience with testing and I need to be able to do the testing via a Jenkins pipeline. I don't understand why or what I'm doing yet and I'd just like to get tests kicked off even though I can't write any tests for myself yet. All I want to do for now is to get a linux server running to do the tests. Any advice is appreciated.
  • l

    Lumiere

    01/20/2023, 3:32 PM
    if you're using pdk already, I would use pdk validate and pdk test unit
1...280281282...428Latest