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

    Tamas Papp

    09/16/2022, 8:24 PM
    That sounds a bit more complicated, what I would like to achieve. If there was a serial number that is increased, if there was a change in the code, that would be great to use. Like a timestamp. So I could ask the server for the last change time and decide if puppet agent should be started.
  • t

    Tamas Papp

    09/16/2022, 8:25 PM
    Probably, if there no such thing, I will do it with a workaround, that's not a problem at all
  • j

    Joel Wilson

    09/16/2022, 8:27 PM
    If you’re on PE, maybe codemanager has an API that will tell you that.
  • t

    Tamas Papp

    09/16/2022, 8:29 PM
    I use OSS puppet
  • t

    Tamas Papp

    09/16/2022, 8:30 PM
    thaks for the suggestions
  • j

    Joel Wilson

    09/16/2022, 8:30 PM
    I do, too. We’ve got a deploy pipeline that pushes the new code into the environment, so it’d be just a matter of adding an extra line to our pipeline to achieve what you want. I guess it all depends on how you guys are delivering the code.
  • t

    Tamas Papp

    09/17/2022, 5:59 AM
    It's delivered to the puppet server via r10k and a cron job
  • t

    Tamas Papp

    09/17/2022, 5:59 AM
    And a cron job starts the agents regularly
  • b

    bastelfreak

    09/17/2022, 7:18 AM
    monitor when agents requests catalogs and avoid a thundering herd problem
  • s

    Slackbot

    09/17/2022, 1:49 PM
    This message was deleted.
    t
    • 2
    • 1
  • b

    bastelfreak

    09/17/2022, 2:04 PM
    the huge benefit of cron is that you can distribute the agents perfectly across a time frame
  • b

    bastelfreak

    09/17/2022, 2:05 PM
    puppet agent as daemon has the splay option to add some variation to the run interval, but thats not perfect
  • s

    Slackbot

    09/17/2022, 8:02 PM
    This message was deleted.
    t
    • 2
    • 1
  • p

    Patrick Rynhart

    09/19/2022, 12:34 AM
    Hi all - Is it possible to define a new (local) variable within a ERB template ?
  • p

    Patrick Rynhart

    09/19/2022, 12:34 AM
    I’m doing lots of this inside an ERB template file:`<%= @dataconnectors['SharedToken']['databaseconnection']['attributes'] %>`
  • p

    Patrick Rynhart

    09/19/2022, 12:35 AM
    Was wanting to assign that whole thing to a variable if possible
  • p

    Patrick Rynhart

    09/19/2022, 12:38 AM
    Seems that an underscore in front of a variable name can help here ?
  • p

    Patrick Rynhart

    09/19/2022, 12:38 AM
    i.e. this seems to work:
  • p

    Patrick Rynhart

    09/19/2022, 12:38 AM
    Copy code
    <%= _dc = @dataconnectors['SharedToken']['databaseconnection']['attributes'] %>
    <%= _dc %>
  • p

    Patrick Rynhart

    09/19/2022, 12:45 AM
    Ah - Unfortunately although the variable definition seems to work, but then the data structure also gets written out to disk (as a result of the first line)
  • p

    Patrick Rynhart

    09/19/2022, 12:45 AM
    Ah - Unfortunately although the variable definition seems to work, but then the data structure also gets written out to disk (as a result of the first line)
  • p

    Patrick Rynhart

    09/19/2022, 12:48 AM
    Hi all - Is it possible to define a new (local) variable within a ERB template ?
  • p

    Patrick Rynhart

    09/19/2022, 12:54 AM
    Is there any way to suppress the output in the assignment ?
  • s

    smortex

    09/19/2022, 12:56 AM
    <% ... %>
    instead of
    <%= ... %>
  • s

    smortex

    09/19/2022, 12:56 AM
    The point of the
    =
    is to output what is evaluated 😉
    🙌 1
  • p

    Patrick Rynhart

    09/19/2022, 12:56 AM
    Oh!
  • p

    Patrick Rynhart

    09/19/2022, 12:58 AM
    Thank you @smortex:)
  • s

    sameer

    09/19/2022, 7:10 AM
    apache::vhost { "xyz.software.com": apache::mod { 'ldap': } apache::mod { 'authnz_ldap': } file { '/etc/apache2/sites-available/test.conf': ensure => present, owner => root, group => root, mode => '0644', source => 'puppet:///modules/mule/xyz.software.com/test.conf', notify => [Exec["enable test.conf"],], } } what is the mistake in this file? when i do puppet parser it points to { in line 4
  • s

    Slackbot

    09/19/2022, 9:27 AM
    This message was deleted.
    s
    d
    d
    • 4
    • 8
  • d

    daloran

    09/19/2022, 9:30 AM
    Your vhost needs a }¿
1...167168169...428Latest