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

    Les Shiner

    04/06/2023, 5:41 PM
    can't seem to get wildcards to work in autosign.conf on my puppetserver... does.. it not accept wildcards? I could have sworn it did
  • v

    vchepkov

    04/06/2023, 5:42 PM
    it does
  • v

    vchepkov

    04/06/2023, 5:45 PM
    puppet class has multiple options, don't do it by hands https://github.com/theforeman/puppet-puppet/blob/master/manifests/init.pp#L41-L59
  • v

    vchepkov

    04/06/2023, 5:45 PM
    puppet class has multiple options, don't do it by hands https://github.com/theforeman/puppet-puppet/blob/master/manifests/init.pp#L41-L59
  • d

    Dr Bunsen Honeydew

    04/06/2023, 8:45 PM
    allthethings 🧑‍🏫PE Console is about to start up in #CFD8Z9A4T
  • s

    Slackbot

    04/07/2023, 3:07 PM
    This message was deleted.
    ✔️ 1
    b
    t
    +2
    • 5
    • 42
  • k

    Kevin S.

    04/07/2023, 3:14 PM
    Hello. We have puppet managing our infrastructure here. We have some pre-production (including build servers) and production servers, which are separate, but currently managed using the same control repo. On the pre-production, there is a shared ownership, and reuse many roles from production, and also use specific roles. I wanted to know if we can continue using the same control repo on the long term, of if there is any better (and documented) pattern to manage these environments that share some bits but differ on some others.
  • k

    Kevin S.

    04/07/2023, 3:15 PM
    Hello. We have puppet managing our infrastructure here. We have some pre-production (including build servers) and production servers, which are separate, but currently managed using the same control repo. On the pre-production, there is a shared ownership, and we reuse many roles from production, and also use specific roles (for build servers), managed by another team. I wanted to know if we can continue using the same control repo on the long term, of if there is any better (and documented) pattern to manage these environments that share some bits but differ on some others.
  • s

    Slackbot

    04/07/2023, 5:05 PM
    This message was deleted.
    b
    c
    • 3
    • 10
  • c

    cdenneen

    04/07/2023, 5:08 PM
    looks like my puppetdb service was down for a bit and now restarting it nodes are showing up in console but with last report of 4/1
  • b

    bastelfreak

    04/07/2023, 5:12 PM
    when puppetdb notices that the factset it has to import is older than what it already has, it won't import it
  • s

    Slackbot

    04/07/2023, 6:05 PM
    This message was deleted.
    c
    b
    j
    • 4
    • 32
  • o

    Oleksandr Lytvyn

    04/10/2023, 5:58 AM
    Hello, please advice - how to specify new line character in inline_epp() ? Currently i have next:
    Copy code
    file { '/opt/bitbucket-webhook/webhook-go-version':
            content => template('profile/webhook-go-version.erb'),
            *       => $file_defaults,
        }
    and content of template (webhook-go-version.erb)
    Copy code
    webhook_go_current_version=<%= @webhook_version %>
    I'm trying to get rid of file "webhook-go-version.erb" and replace it with `inline_epp`:
    Copy code
    file { '/opt/bitbucket-webhook/webhook-go-version':
            content => inline_epp('webhook_go_current_version=<%= $webhook_version %>', {webhook_version => $webhook_version}),
            *       => $file_defaults,
        }
    The problem is: when i run --noop it tries to remove newline. I'm trying to get round that but so far cannot understand how should i specify newline break/escape character? Tried to read documentation but didn't found answer (https://www.puppet.com/docs/puppet/7/function.html) Examples of what i have tried:
    Copy code
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>', {webhook_version => $webhook_version}), # default syntax from documentation
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>\r\n', {webhook_version => $webhook_version}),
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>\n', {webhook_version => $webhook_version}),
    content => inline_epp("webhook_go_current_version=<%= $webhook_version %>\n", {webhook_version => $webhook_version}),  # got a syntax error here
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>"\n"', {webhook_version => $webhook_version}),
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>\r', {webhook_version => $webhook_version}),
    here are some examples of --noop output:
    Copy code
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1
    \ No newline at end of file
    
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1"\n"
    \ No newline at end of file
    
    
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1\r\n
    \ No newline at end of file
    
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1\r
    \ No newline at end of file
    Thanks PS. I'm not expert in CRLF and/or LF, i just want to add new line character 😄
    ✅ 1
  • o

    Oleksandr Lytvyn

    04/10/2023, 6:06 AM
    Hello, please advice - how to specify new line character in inline_epp() ? Currently i have next:
    Copy code
    file { '/opt/bitbucket-webhook/webhook-go-version':
            content => template('profile/webhook-go-version.erb'),
            *       => $file_defaults,
        }
    and content of template (webhook-go-version.erb)
    Copy code
    webhook_go_current_version=<%= @webhook_version %>
    I'm trying to get rid of file "webhook-go-version.erb" and replace it with `inline_epp`:
    Copy code
    file { '/opt/bitbucket-webhook/webhook-go-version':
            content => inline_epp('webhook_go_current_version=<%= $webhook_version %>', {webhook_version => $webhook_version}),
            *       => $file_defaults,
        }
    The problem is: when i run --noop it tries to remove newline. I'm trying to get round that but so far cannot understand how should i specify newline break/escape character? Tried to read documentation but didn't found answer (https://www.puppet.com/docs/puppet/7/function.html) Examples of what i have tried:
    Copy code
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>', {webhook_version => $webhook_version}), # default syntax from documentation
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>\r\n', {webhook_version => $webhook_version}),
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>\n', {webhook_version => $webhook_version}),
    content => inline_epp("webhook_go_current_version=<%= $webhook_version %>\n", {webhook_version => $webhook_version}),  # got a syntax error here
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>"\n"', {webhook_version => $webhook_version}),
    here are some examples of --noop output:
    Copy code
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1
    \ No newline at end of file
    
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1"\n"
    \ No newline at end of file
    
    
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1\r\n
    \ No newline at end of file
    Thanks PS. I'm not expert in CRLF and/or LF, i just want to add new line character 😄
  • o

    Oleksandr Lytvyn

    04/10/2023, 6:08 AM
    Hello, please advice - how to specify new line character in inline_epp() ? Currently i have next:
    Copy code
    file { '/opt/bitbucket-webhook/webhook-go-version':
            content => template('profile/webhook-go-version.erb'),
            *       => $file_defaults,
        }
    and content of template (webhook-go-version.erb)
    Copy code
    webhook_go_current_version=<%= @webhook_version %>
    I'm trying to get rid of file "webhook-go-version.erb" and replace it with `inline_epp`:
    Copy code
    file { '/opt/bitbucket-webhook/webhook-go-version':
            content => inline_epp('webhook_go_current_version=<%= $webhook_version %>', {webhook_version => $webhook_version}),
            *       => $file_defaults,
        }
    The problem is: when i run --noop it tries to remove newline. I'm trying to get round that but so far cannot understand how should i specify newline break/escape character? Tried to read documentation but didn't found answer (https://www.puppet.com/docs/puppet/7/function.html) Examples of what i have tried:
    Copy code
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>', {webhook_version => $webhook_version}), # default syntax from documentation
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>\r\n', {webhook_version => $webhook_version}),
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>\n', {webhook_version => $webhook_version}),
    content => inline_epp("webhook_go_current_version=<%= $webhook_version %>\n", {webhook_version => $webhook_version}),  # got a syntax error here
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>"\n"', {webhook_version => $webhook_version}),
    content => inline_epp('webhook_go_current_version=<%= $webhook_version %>\r', {webhook_version => $webhook_version}),
    here are some examples of --noop output:
    Copy code
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1
    \ No newline at end of file
    
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1"\n"
    \ No newline at end of file
    
    
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1\r\n
    \ No newline at end of file
    
    @@ -1 +1 @@
    -webhook_go_current_version=2.0.1
    +webhook_go_current_version=2.0.1\r
    \ No newline at end of file
    Thanks PS. I'm not expert in CRLF and/or LF, i just want to add new line character 😄
  • y

    Yury Bushmelev

    04/10/2023, 7:10 AM
    I’d suggest to use the string interpolation in this case instead. Something like: content => “webhook_go_current_version=${webhook_version}\n”
    👍 1
  • y

    Yury Bushmelev

    04/10/2023, 7:11 AM
    I’d suggest to use the string interpolation in this case instead. Something like: content => “webhook_go_current_version=${webhook_version}\n”
  • y

    Yury Bushmelev

    04/10/2023, 7:14 AM
    Wrt inline_epp, it should work with “…\n” I believe.
  • y

    Yury Bushmelev

    04/10/2023, 7:15 AM
    But there is not much profit from using a template in this particular case I’d say
  • o

    Oleksandr Lytvyn

    04/10/2023, 7:22 AM
    Thanks, haven't though about it 😄
  • s

    smortex

    04/10/2023, 7:23 AM
    'webhook_go_current_version=<%= $webhook_version %>'
    has no newline char, so either with
    "...\n"
    (note the double quotes), or a heredoc will do it:
    Copy code
    content => inline_epp(@(DOC), {webhook_version => $webhook_version}),
    webhook_go_current_version=<%= $webhook_version %>
    | DOC
    💯 1
  • s

    Scott Macmillan

    04/10/2023, 2:26 PM
    Hey folks. Looking at recommended perf tweaks for puppetserver, I see it recommended to change
    environment_timeout
    to a non-zero value. Assuming you change it to an expiration time (i.e., not unlimited), under what circumstances will the cache get invalidated? I.e., if I set this to
    3m
    , should I be expecting possible stale puppet runs within that 3m window? Thanks!
  • v

    vchepkov

    04/10/2023, 2:32 PM
    I have mine set to unlimited and I refresh environment via hook in r10k
  • v

    vchepkov

    04/10/2023, 2:33 PM
    Copy code
    for environment in $1; do
      /bin/curl -k --cert <%= $settings::hostcert %> \
      --key <%= $settings::hostprivkey %> -X DELETE \
      <https://localhost:8140/puppet-admin-api/v1/environment-cache>\?environment=$environment
    done
  • y

    Yury Bushmelev

    04/10/2023, 2:34 PM
    IIRC there are just 2 options - either it’s off (0) or unlimited (any other value).. so you should call the URL above to clean the cache
  • y

    Yury Bushmelev

    04/10/2023, 2:34 PM
    IIRC there are just 2 options - either it’s off (0) or unlimited (any other value).. so you should call the URL above to clean the cache
  • y

    Yury Bushmelev

    04/10/2023, 2:34 PM
    not sure about PE though.. maybe cache expiration and cleanup is implemented there
  • y

    Yury Bushmelev

    04/10/2023, 2:34 PM
    not sure about PE though.. maybe cache expiration and cleanup is implemented there
  • v

    vchepkov

    04/10/2023, 2:35 PM
    PE wants you to have unlimited if code manager is enabled
  • y

    Yury Bushmelev

    04/10/2023, 2:35 PM
    ah, so it’s the same then
1...343344345...428Latest