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

    matt

    08/01/2022, 6:24 PM
    @Graeme Donaldson thanks just spotted that, but it appears my lookup is failing from the cli, probably need to understand why that's failing before the problem with that specific lookup
  • n

    natemccurdy

    08/01/2022, 6:24 PM
    The
    --explain
    output should help here. Maybe check for variables that aren’t expanding as expectecd.
  • v

    vchepkov

    08/01/2022, 6:24 PM
    do you run it as root ?
  • c

    csharpsteen

    08/01/2022, 6:24 PM
    --explain
    should show you where it looked. From there it's a matter of determining why an expected file was skipped.
  • v

    vchepkov

    08/01/2022, 6:24 PM
    lookup ?
  • v

    vchepkov

    08/01/2022, 6:25 PM
    because non-root looks in different place
  • n

    natemccurdy

    08/01/2022, 6:25 PM
    Also note, you should be running that on a puppetserver, not from an agent.
  • m

    matt

    08/01/2022, 6:25 PM
    may have figured it, one moment
  • m

    matt

    08/01/2022, 6:25 PM
    user error on my part
  • m

    matt

    08/01/2022, 6:26 PM
    the lookup is working, just need to fix the initial prometheus param lookup - which does look a legit problem with my definition
  • m

    matt

    08/01/2022, 6:27 PM
    so the explain shows 'no such key'
  • m

    matt

    08/01/2022, 6:27 PM
    Hierarchy entry "Per-node data" Path "/etc/puppetlabs/code/environments/production/data/nodes/router.no-dns.co.uk.yaml" Original path: "nodes/%{trusted.certname}.yaml" No such key: "prometheus:bind exporter:extra_options"
  • m

    matt

    08/01/2022, 6:27 PM
    ahhh hang on
  • m

    matt

    08/01/2022, 6:28 PM
    got it - it was my hiera definition
  • m

    matt

    08/01/2022, 6:29 PM
    I'd done prometheus:bind exporter then extra_option: --stuff
  • m

    matt

    08/01/2022, 6:29 PM
    needed to do prometheus:bind exporterextra options --stuff
  • c

    csharpsteen

    08/01/2022, 6:30 PM
    Yup, lookup only sees the top layer of keys. So you can't nest a hash of parameters, you have to fully qualify each parameter name.
  • m

    matt

    08/01/2022, 6:30 PM
    didn't know that, thank you
  • c

    csharpsteen

    08/01/2022, 6:34 PM
    The docs have some examples: https://puppet.com/docs/puppet/7/hiera_quick.html
    đź‘€ 1
  • c

    csharpsteen

    08/01/2022, 6:34 PM
    The docs have some examples: https://puppet.com/docs/puppet/7/hiera_quick.html
  • s

    Slackbot

    08/01/2022, 8:01 PM
    This message was deleted.
    i
    r
    v
    • 4
    • 7
  • v

    vchepkov

    08/01/2022, 8:01 PM
    that's not how puppet is designed
  • s

    Slackbot

    08/01/2022, 8:02 PM
    This message was deleted.
    i
    k
    v
    • 4
    • 7
  • v

    vchepkov

    08/01/2022, 8:13 PM
    Copy code
    exec { '/install stuff':
      creates => '/path/to/installed/stuff'
  • i

    inc0gnit0

    08/01/2022, 8:16 PM
    ah ok, that will work. thanks!
  • b

    binford2k

    08/01/2022, 9:10 PM
    @inc0gnit0 it will help if you change your thinking about Puppet. It doesn’t run tasks like “install elasticsearch”, it maintains state like “ensure that elasticsearch is installed”
  • s

    Slackbot

    08/01/2022, 9:12 PM
    This message was deleted.
    n
    l
    +4
    • 7
    • 14
  • j

    jhoblitt

    08/01/2022, 10:15 PM
    @csharpsteen That is a good idea...
    puppet strings
    is almost certainly parsing the files in a nominally not-dumb way.
  • c

    Corporate Gadfly

    08/01/2022, 11:17 PM
    Would https://github.com/dylanratcliffe/onceover be an option?
  • s

    Slackbot

    08/02/2022, 8:52 AM
    This message was deleted.
    h
    d
    • 3
    • 4
1...116117118...428Latest