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

    Yehuda Katz

    06/01/2022, 12:59 PM
    At the most basic, use the built-in
    file
    ,
    exec
    , and other "built-in" types: https://puppet.com/docs/puppet/7/type.html Also look at the
    stdlib
    module which adds
    file_line
    and some other useful helpers: https://forge.puppet.com/modules/puppetlabs/stdlib Find a simple module and see how it works. I have recently been doing a lot of work with the Puppetlabs HAProxy module - it is large, but simple.
  • y

    Yehuda Katz

    06/01/2022, 1:04 PM
    I know Dr. Bunsen Honeydew is a bot, but when I post code snippets or output, it often replies with something about Karma (and generally a negative value). What is that about?
  • s

    Slackbot

    06/01/2022, 1:05 PM
    This message was deleted.
    y
    l
    • 3
    • 3
  • y

    Yehuda Katz

    06/01/2022, 1:08 PM
    Ah, found the code: https://github.com/puppetlabs/bunsen/blob/main/scripts/karma.coffee
  • z

    Zeke Marffy

    06/01/2022, 1:30 PM
    I am writing a provider with Ruby and pretty sure I need to do so, as determining the "is" value is done by somewhat complicated HTTP requests to an API (as well as some stuff in the
    create
    and
    destroy
    , so I am using
    httparty
    . I do apologize but still don't understand where to write the steps to determine that "is" value. Cannot find info on that in the documentation.
  • z

    Zeke Marffy

    06/01/2022, 1:37 PM
    I am writing a provider with Ruby and pretty sure I need to do so, as determining the "is" value is done by somewhat complicated HTTP requests to an API (as well as some stuff in the
    create
    and
    destroy
    ), so I am using
    httparty
    . I do apologize but still don't understand where to write the steps to determine that "is" value. Cannot find info on that in the documentation.
  • s

    Slackbot

    06/01/2022, 4:18 PM
    This message was deleted.
    t
    • 2
    • 1
  • l

    Lumiere

    06/01/2022, 4:22 PM
    in the definition you can do
    Enum['present', 'absent'] $ensure = 'present'
    gratitude thank you 1
  • l

    Lumiere

    06/01/2022, 4:24 PM
    basically all of the old validate_* functions are now static typing at the class or define level
  • s

    Slackbot

    06/01/2022, 4:27 PM
    This message was deleted.
    s
    t
    • 3
    • 2
  • c

    CVQuesty

    06/01/2022, 4:27 PM
    test
  • c

    CVQuesty

    06/01/2022, 4:27 PM
    Buh. I have duplicate accounts
  • y

    Yehuda Katz

    06/01/2022, 5:39 PM
    Can someone rerun the failed test on https://github.com/puppetlabs/puppetlabs-haproxy/pull/508?
  • y

    Yehuda Katz

    06/01/2022, 5:39 PM
    Can someone rerun the failed test on https://github.com/puppetlabs/puppetlabs-haproxy/pull/508?
  • y

    Yehuda Katz

    06/02/2022, 2:23 AM
    There is an open bug - https://github.com/puppetlabs/bunsen/issues/4 - and I submitted a PR for a possible fix.
  • m

    Mike Renfro

    06/02/2022, 2:59 AM
    Before I reinvent the wheel poorly, is there an existing fact that shows the CIDR prefix for the default network interface, i.e., if
    networking.netmask
    is
    255.255.255.0
    , would return
    24
    ? Pretty sure I’ve seen Puppet functions, but would want to do this in Hiera so I can make a firewalld zone for the local subnet. Might be able to convince firewalld to use the existing dotted quad notation, but the fact that I could put in an invalid netmask without complaint doesn’t give me confidence there.
  • m

    Manuel Nhiuana

    06/02/2022, 5:14 AM
    good day,
  • m

    matt

    06/02/2022, 12:54 PM
    I've just wrote a really really basic class to fix some config errors on some legacy hosts, I've just linted the class and it's complaining "ERROR: cfg_fixup not in autoload module layout on line 4 (check: autoloader_layout)" which I don't understand why, the class is called cfg_fixup, the two files in the class init.pp and config.pp are in the right location cfg_fixup/manifiests/{init.pp,config.pp} cfg_fixup maps to init.pp just fine and cfg_fixup::config maps to config.pp just fine, so I don't understand why I'd get this error on linting
  • m

    matt

    06/02/2022, 1:00 PM
    to make it bit more weird if I puppet parser validate on the development box (puppet 7) both classes validate fine, if I move them to the puppet master and validate (puppet 6) I get a validation error (similar to the linting warning)
  • m

    matt

    06/02/2022, 1:00 PM
    Error: Could not parse for environment production: Unacceptable location. The name 'cfg_fixup' is unacceptable in file '/etc/puppetlabs/code/environments/production/modules/cfg_fixup/manifiests/init.pp' (file: /etc/puppetlabs/code/environments/production/modules/cfg_fixup/manifiests/init.pp, line: 4, column: 1)
  • m

    matt

    06/02/2022, 1:00 PM
    but again the class is called cfg_fixup - so that location for init.pp should be fine
  • m

    matt

    06/02/2022, 1:00 PM
    what am I missing ?
  • m

    matt

    06/02/2022, 1:16 PM
    just spotted a typo I think
  • m

    matt

    06/02/2022, 1:19 PM
    that was the problem, spelling typo
  • s

    Slackbot

    06/02/2022, 2:00 PM
    This message was deleted.
    h
    s
    • 3
    • 9
  • s

    Slackbot

    06/02/2022, 2:18 PM
    This message was deleted.
    h
    m
    +5
    • 8
    • 75
  • h

    hbui

    06/02/2022, 2:40 PM
    https://github.com/puppetlabs/puppet-agent
  • b

    bastelfreak

    06/02/2022, 3:31 PM
    There is https://github.com/stahnma/puppet-pi-builder and https://github.com/Sharpie/puppet-build-experiment
  • h

    helindbe

    06/02/2022, 3:59 PM
    Here is a backend that I wrote: https://github.com/hlindberg/tahu/blob/master/lib/puppet/functions/tahu/ppyaml_key.rb
  • j

    josh

    06/02/2022, 5:17 PM
    re: Ubuntu 22.04, it's in progress, hope to have nightly builds in a week or two and ship packages in the next platform releases (late June/early July). Follow https://tickets.puppetlabs.com/browse/PA-4233 for updates.
1...555657...428Latest