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

    Jonathon Anderson

    06/17/2022, 3:03 PM
    no, just a site manifest
  • j

    Jonathon Anderson

    06/17/2022, 3:03 PM
    we're not using an ENC
  • c

    CVQuesty

    06/17/2022, 3:03 PM
    ok… what’s in his node declaration?
  • c

    CVQuesty

    06/17/2022, 3:04 PM
    node ‘your master’ { include stuff }
  • c

    CVQuesty

    06/17/2022, 3:04 PM
    I need to stop using the word MASTER. Old habits die hard.
  • j

    Jonathon Anderson

    06/17/2022, 3:05 PM
    we're not using node declarations like that, just a bunch of
    if
    statements... much more flexible
  • j

    Jonathon Anderson

    06/17/2022, 3:05 PM
    i.e. we can assign the same classes to all windows machines much easier
  • j

    Jonathon Anderson

    06/17/2022, 3:06 PM
    okay, looks like
    agent_specified_environment
    is a built in fact for puppet, not facter
  • c

    CVQuesty

    06/17/2022, 3:07 PM
    oh lord… a bunch of if statements….
  • c

    CVQuesty

    06/17/2022, 3:08 PM
    If your host naming is well designed, you can use REGEX to broadly apply classes against all “win” machines
  • v

    vchepkov

    06/17/2022, 3:08 PM
    or use cert extensions
  • c

    CVQuesty

    06/17/2022, 3:08 PM
    that too
  • c

    CVQuesty

    06/17/2022, 3:09 PM
    a little mre vchepkov-y, but I’ll take it. LOLOL
  • c

    CVQuesty

    06/17/2022, 3:09 PM
    whenever possible keep it simple. as simple as is humanly possible is my standard MO
  • v

    vchepkov

    06/17/2022, 3:10 PM
    simple as this
    Copy code
    node default {
      if $trusted['extensions']['pp_service'] {
        include $trusted['extensions']['pp_service']
      } else {
        include corp::role::server
      }
    }
  • c

    CVQuesty

    06/17/2022, 3:11 PM
    doesn’t seem to have any node declarations
  • c

    CVQuesty

    06/17/2022, 3:11 PM
    I may have misunderstood there
  • j

    Jonathon Anderson

    06/17/2022, 3:11 PM
    yea, that's pretty much the same thing we're doing, just not in the default node... i.e. ther is an if statement checking for windows os, then this
  • v

    vchepkov

    06/17/2022, 3:12 PM
    that not a good style of organizing puppet code. I would recommend reading on role/profiles
  • c

    CVQuesty

    06/17/2022, 3:12 PM
    I can imagine a number of compilation nightmares this could engender given the right circumstances
  • j

    Jonathon Anderson

    06/17/2022, 3:12 PM
    haven't had a single issue with it
  • c

    CVQuesty

    06/17/2022, 3:12 PM
    https://puppet.com/docs/pe/2019.8/osp/the_roles_and_profiles_method.html
  • c

    CVQuesty

    06/17/2022, 3:13 PM

    https://youtu.be/v9LB-NX4_KQ▾

  • c

    CVQuesty

    06/17/2022, 3:13 PM
    It’s our job to recommend “best practices” as Puppet defines it. Don’t shoot the messengers.
  • c

    CVQuesty

    06/17/2022, 3:13 PM
    It’s our job to recommend “best practices” as Puppet defines it. Don’t shoot the messengers.
  • j

    Jonathon Anderson

    06/17/2022, 3:13 PM
    we're not using an ENC
  • v

    vchepkov

    06/17/2022, 3:14 PM
    and not to be picky, but I never do
    if !
    there is
    unless
    👍🏼 1
  • c

    CVQuesty

    06/17/2022, 3:14 PM
    you don’t have to
  • c

    CVQuesty

    06/17/2022, 3:14 PM

    https://youtu.be/yZEVxL4TuKw▾

  • j

    Jonathon Anderson

    06/17/2022, 3:16 PM
    yea, just reading the intro to this doc, it says it's not straightforward, and if manifests are working fine then it may not be applicable. We're too small to dedicate anyone to this type of project right now
1...697071...428Latest