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

    Lumiere

    09/16/2022, 4:24 PM
    hope it helps
  • b

    Brian Schonecker

    09/16/2022, 5:33 PM
    I'm looking to puppetize SAMBA but unfortunately the more popular projects are 4-6 years old. I would be most appreciative if you'd share what samba module would be recommended.
  • b

    bastelfreak

    09/16/2022, 5:38 PM
    https://forge.puppet.com/modules/rehan/samba code looks okay, as far as I can tell that within a minute
  • b

    bastelfreak

    09/16/2022, 5:38 PM
    but I didnt use it
  • b

    Brian Schonecker

    09/16/2022, 5:39 PM
    Ahhh....thanks. I didn't look at the projects with less than top-5 popularity.
  • j

    John Ratliff

    09/16/2022, 6:28 PM
    Can you construct a variable name dynamically? Say I had two variables in my class $my_class::a and $my_class::b. I want to iterate over the values ['a','b'] and lookup $my_class::$item where $item is 'a' or 'b'.
  • n

    natemccurdy

    09/16/2022, 6:29 PM
    Yeah, using the
    getvar()
    function makes that easy: https://puppet.com/docs/puppet/7/function.html#getvar
  • n

    natemccurdy

    09/16/2022, 6:29 PM
    Yeah, using the
    getvar()
    function makes that easy: https://puppet.com/docs/puppet/7/function.html#getvar
  • n

    natemccurdy

    09/16/2022, 6:30 PM
    Copy code
    $example1 = getvar("my_class::${a}")
    $example2 = getvar("my_class::${b}")
  • n

    natemccurdy

    09/16/2022, 6:31 PM
    (use string concatenation to build the actual variable’s name, then put that in
    getvar()
    )
  • j

    John Ratliff

    09/16/2022, 6:31 PM
    Thanks
  • s

    Slackbot

    09/16/2022, 7:41 PM
    This message was deleted.
    n
    j
    +3
    • 6
    • 166
  • n

    natemccurdy

    09/16/2022, 7:54 PM
    Also,
    max-queue-length
    ? Is that the right name? Did you mean
    max-queued-requests
    ?
  • n

    natemccurdy

    09/16/2022, 7:57 PM
    And yeah, 7 jrubies seems low. I’d recommend trying 10-12
    max-active-instances
    and seeing how that fares.
  • t

    Tamas Papp

    09/16/2022, 8:06 PM
    hi All, I have a question regarding the API
  • t

    Tamas Papp

    09/16/2022, 8:06 PM
    Is there any way to query puppet if there was any change in the code?
  • t

    Tamas Papp

    09/16/2022, 8:08 PM
    What I basically would like to achieve is detect frequently, if there is a change on the code, so a puppet agent should be started to apply the changes.
  • t

    Tamas Papp

    09/16/2022, 8:09 PM
    Is there any way to obtain that information from the puppet server?
  • j

    Joel Wilson

    09/16/2022, 8:09 PM
    You mean new module code? Puppet’s default interval is 30 minutes, so it should pick it up fairly often.
  • s

    Slackbot

    09/16/2022, 8:11 PM
    This message was deleted.
    v
    t
    • 3
    • 6
  • n

    natemccurdy

    09/16/2022, 8:12 PM
    How are you running the agent currently? Is it on a timer (cron/systemd/scheduled_task/built-in-service), or do you always manually start a Puppet run?
  • s

    Slackbot

    09/16/2022, 8:13 PM
    This message was deleted.
    👍 1
    b
    r
    • 3
    • 2
  • t

    Tamas Papp

    09/16/2022, 8:14 PM
    it's a cron job currently
  • j

    Joel Wilson

    09/16/2022, 8:16 PM
    It depends on the number of nodes and masters, of course. Decreasing interval can mean more catalog compiles and could affect load there.
  • t

    Tamas Papp

    09/16/2022, 8:17 PM
    If nothing changed in the code, the agent won't do anything.
    It checks if the local configuration matches to the one on the server, isn't that? Like is the content of the file the same like on the server?
  • t

    Tamas Papp

    09/16/2022, 8:18 PM
    In my environment it takes about 10 sec, even if it changes nothing
  • t

    Tamas Papp

    09/16/2022, 8:18 PM
    In my environment it takes about 10 sec, even if it changes nothing
  • y

    Yorokobi

    09/16/2022, 8:19 PM
    s/do/change/ mea culpa
  • t

    Tamas Papp

    09/16/2022, 8:20 PM
    eg. collecting facts is a resource intensive part of the task.
  • j

    Joel Wilson

    09/16/2022, 8:21 PM
    Well, you could lower the cron interval, and then have something on the master that watches the results of r10k or codemanager to see if it picked up something new and if it does, trigger a bolt task to run puppet on the nodes you want to go early.
1...166167168...428Latest