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

    gary

    01/18/2023, 7:20 PM
    I've run into a situation when using a module with its core fact is preventing a custom fact from using the external fact (overriding said module core fact) with
    Facter.value
    . Any ideas whats going on / what am I doing wrong? Note this is only when I set the external fact (/etc/facter/facts.d/fact.json). The custom fact works fine when running without the module (see snippet). Pasting snippets in this thread so I don't spam everyone.
  • t

    todd.seidenberg

    01/18/2023, 9:03 PM
    Copy code
    include ::foo
    include ::bar
    
    Class['bar'] 
    -> Class['foo']
  • t

    todd.seidenberg

    01/18/2023, 9:04 PM
    ok - even without the
    ;;
  • s

    Slackbot

    01/18/2023, 9:04 PM
    This message was deleted.
    c
    d
    • 3
    • 3
  • s

    Slackbot

    01/18/2023, 9:20 PM
    This message was deleted.
    d
    r
    • 3
    • 3
  • g

    gary

    01/18/2023, 9:54 PM
    Hi! missed your message. So I'm trying to test the module inside a docker instance and wanted/needed to overwrite the lldp fact with the fact output (stripped down to only eno1's descr field) from one our bare metal hosts. It actually seems to be working fine on bare metal but would like to do testing inside docker during our ci/cd.
  • g

    gary

    01/18/2023, 10:03 PM
    It should duplicate it. naming the variable
    lldp
    that calls
    Facter.value(:lldp)
    is proabbly not the best call 🙂
  • j

    Joe Abbate

    01/18/2023, 10:37 PM
    Is it possible to configure agents that if they can’t connect to the master to still run with the cached catalog?
  • n

    natemccurdy

    01/18/2023, 10:40 PM
    Yes. Assuming they've done at least one successful run, they'd need to run Puppet with the
    --use_cached_catalog
    flag or with the
    use_cached_catalog
    config option set to
    true
    . For example:
    Copy code
    sudo puppet agent --use_cached_catalog
    Also note that if you're using the
    -t
    (
    --test
    ) flag, the agent will not use a cached catalog since
    -t
    includes the
    --no-usecacheonfailure
    flag.
  • n

    natemccurdy

    01/18/2023, 10:41 PM
    For reference: • https://www.puppet.com/docs/puppet/7/configuration.html#use-cached-catalog • https://www.puppet.com/docs/puppet/7/man/agent.html#options • https://www.puppet.com/docs/puppet/7/configuration.html#usecacheonfailure
  • n

    natemccurdy

    01/18/2023, 10:42 PM
    Yes. Assuming they've done at least one successful run, they'd need to run Puppet with the
    --use_cached_catalog
    flag or with the
    use_cached_catalog
    config option set to
    true
    . For example:
    Copy code
    sudo puppet agent --use_cached_catalog
    Also note that if you're using the
    -t
    (
    --test
    ) flag, the agent will not use a cached catalog since
    -t
    includes the
    --no-use_cached_catalog
    flag.
  • n

    natemccurdy

    01/18/2023, 10:42 PM
    Yes. Assuming they've done at least one successful run, they'd need to run Puppet with the
    --use_cached_catalog
    flag or with the
    use_cached_catalog
    config option set to
    true
    . For example:
    Copy code
    sudo puppet agent --use_cached_catalog
    Also note that if you're using the
    -t
    (
    --test
    ) flag, the agent will not use a cached catalog since
    -t
    includes the
    --no-usecacheonfailure
    flag.
  • n

    natemccurdy

    01/18/2023, 10:43 PM
    For reference: • https://www.puppet.com/docs/puppet/7/configuration.html#use-cached-catalog • https://www.puppet.com/docs/puppet/7/man/agent.html#options • https://www.puppet.com/docs/puppet/7/configuration.html#usecacheonfailure
  • s

    Slackbot

    01/18/2023, 10:45 PM
    This message was deleted.
    j
    n
    • 3
    • 6
  • n

    natemccurdy

    01/18/2023, 10:46 PM
    Err.. to clarify, if you want the agent to try to talk to the Puppetserver first, using the catalog it receives if possible, then fall back to using the last cached catalog, use the
    usecacheonfailure
    option. If you want the agent to only use the cached catalog and not try to get a new one, use the
    use_cached_catalog
    option.
  • c

    Craig Gumbley

    01/19/2023, 12:57 PM
    Pinging @David Sandilands for awareness
  • d

    David Sandilands

    01/19/2023, 1:18 PM
    I'll raise with Phoenix and David P
  • l

    Les Shiner

    01/19/2023, 5:19 PM
    can't seem to find a direct answer, puppet 7 work on windows 7?
  • l

    Les Shiner

    01/19/2023, 5:19 PM
    🙂
  • l

    Les Shiner

    01/19/2023, 5:19 PM
    i see some x86 installers, but nothing directly stating
  • d

    David Sandilands

    01/19/2023, 5:21 PM
    @Les Shiner https://www.puppet.com/docs/puppet/7/system_requirements.html#supported_operating_systems-packaged-platforms is not tested or listed as known to work.
  • l

    Les Shiner

    01/19/2023, 5:22 PM
    maybe i should change the word "work" to "is supported still"
  • l

    Les Shiner

    01/19/2023, 5:22 PM
    oh dang, thanks @David Sandilands!
  • s

    Slackbot

    01/19/2023, 6:30 PM
    This message was deleted.
    c
    c
    • 3
    • 4
  • r

    rusty

    01/19/2023, 7:19 PM
    What is the common accepted best pattern for a class parameter that is
    Optional[Enum['thing1', 'thing2']] $param = undef,
    when you have a default in mind. Using the default value instead of
    undef
    makes puppet-lint angry.
  • r

    rusty

    01/19/2023, 7:20 PM
    back in the dark times we had all the validate* functions from stdlib..
  • n

    natemccurdy

    01/19/2023, 7:22 PM
    If your default value isn't literally
    undef
    , don't use a data type of
    Optional
  • r

    rusty

    01/19/2023, 7:23 PM
    heh, literal undef. That would mess with people. 😉
  • n

    natemccurdy

    01/19/2023, 7:24 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'
  • r

    rusty

    01/19/2023, 7:24 PM
    thanks
1...279280281...428Latest