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

    baurmatt

    07/20/2022, 8:33 AM
    Right... Let me look it up 😄 Haven't done much Puppet lately 🙈
  • a

    Alex Fisher

    07/20/2022, 8:35 AM
    oh sorry, the code obviously only corrects for variables with a second set of
    ::
  • a

    Alex Fisher

    07/20/2022, 8:37 AM
    Otherwise when you were referring to a topscope variable (eg. from an enc or set in site.pp) it'd correct it to a local scope variable (which would be bad)
  • a

    Alex Fisher

    07/20/2022, 8:39 AM
    (https://github.com/mmckinst/puppet-lint-top_scope_facts-check might complain about them though assuming they should be facts unless you whitelist them. This is why I've always wanted a
    enc
    hash to compliment the
    facts
    hash)
  • a

    Alex Fisher

    07/20/2022, 8:39 AM
    (https://github.com/mmckinst/puppet-lint-top_scope_facts-check might complain about them though assuming they should be facts unless you whitelist them. This is why I've always wanted a
    enc
    hash to compliment the
    facts
    hash)
  • b

    baurmatt

    07/20/2022, 8:41 AM
    I hate threads -.-
  • b

    baurmatt

    07/20/2022, 8:42 AM
    Ah ok, so it's just complains about variables with a second
    ::
    🤔 Yeah, make sense 😄 Thanks for looking this up! 🙂 I will close the issue as invalid.
  • b

    baurmatt

    07/20/2022, 8:42 AM
    Ah ok, so it's just complains about variables with a second
    ::
    🤔 Yeah, make sense 😄 Thanks for looking this up! 🙂 I will close the issue as invalid.
  • a

    Alex Fisher

    07/20/2022, 8:42 AM
    @josh Can we have an
    enc
    hash in Puppet 8 please? 😉
  • b

    baurmatt

    07/20/2022, 8:44 AM
    Do you want our Puppet setup to burn? 😄
  • a

    Alex Fisher

    07/20/2022, 8:44 AM
    That's why I suggested a major release! 🙂
  • b

    baurmatt

    07/20/2022, 8:44 AM
    But on the other hand... We haven't switch to Puppet 7 yet, so it might take another half decade to switch to Puppet 8 😄
  • a

    Alex Fisher

    07/20/2022, 8:44 AM
    but I guess it could also be configurable??
  • b

    baurmatt

    07/20/2022, 8:45 AM
    Sure 🙂 I'm also happy to change our enc code in case this might be really breaking in Puppet 8 🙂 In the end it's probably just a revert 😄
  • a

    Alex Fisher

    07/20/2022, 8:46 AM
    Maybe it's easier to just create an
    enc
    function?
  • b

    baurmatt

    07/20/2022, 8:53 AM
    Can't follow, sorry 🙈
  • a

    Alex Fisher

    07/20/2022, 8:54 AM
    I'm thinking that's something I could do in a module without needing anything to change in core Puppet.
  • v

    VoxBot

    07/20/2022, 8:56 AM
    it could be $trusted['enc'] as well
  • v

    VoxBot

    07/20/2022, 8:57 AM
    think about the environment, keep the global namespace clean :)
  • a

    Alex Fisher

    07/20/2022, 8:57 AM
    Not sure if I could actually limit it to variables that came from the enc though. But might be a nice way to document where the variable comes from in my manifests. eg. writing
    enc('tier')
    instead of
    $::tier
    which might be a fact or from the enc)
  • v

    VoxBot

    07/20/2022, 8:58 AM
    I do prefer $trusted['enc']
  • v

    VoxBot

    07/20/2022, 8:58 AM
    puppetserver already has support for $trusted and also for embedding data from scripts executed in the puppetserver, that's almost like an ENC
  • v

    VoxBot

    07/20/2022, 8:59 AM
    so I think it makes sense to have ENC data in $trusted as well
  • v

    VoxBot

    07/20/2022, 9:00 AM
    (also I think https://puppet.com/docs/patterns-and-tactics/latest/integration/integration-with-external-data-providers.html#trusted-external-command is totall underrated)
  • v

    VoxBot

    07/20/2022, 9:00 AM
    and largely unknown
  • a

    Alex Fisher

    07/20/2022, 9:00 AM
    Node scope is also a pain. My role/tier etc. are actually set in site.pp inside
    node
    definitions, so have to be accessed as
    $role
    $tier
    etc. It's not clear when glancing at code that they're not coming from the local scope, and they're definitely not top scope, so
    $::role
    is wrong.
  • v

    VoxBot

    07/20/2022, 9:00 AM
    that sounds like an odd/interesting pattern
  • a

    Alex Fisher

    07/20/2022, 9:07 AM
    ewoud - https://puppet.com/docs/patterns-and-tactics/latest/integration/integration-with-external-data-providers.html#fact-terminus sounds like a better way of getting facts in to Foreman than the inotify stuff in Foreman's enc script? (for users who aren't actually using Foreman as their ENC)
  • v

    VoxBot

    07/20/2022, 9:09 AM
    afisher: yes, but the challenge is that you can only have one fact terminus and puppetdb also wants to be one
  • v

    VoxBot

    07/20/2022, 9:09 AM
    so you end up subclassing the puppetdb and hacking it, but if you don't want puppetdb you need to implement another class too
1...106107108...648Latest