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

    VoxBot

    04/07/2023, 12:05 PM
    indeed
  • y

    Yury Bushmelev

    04/07/2023, 12:12 PM
    well.. anyway itโ€™s out of the current module scope as I see.. provider is just using augeas methods
  • v

    VoxBot

    04/07/2023, 12:13 PM
    I do recall seeing another module where Puppet 7 failed
  • y

    Yury Bushmelev

    04/07/2023, 12:13 PM
    so we can release with warning that itโ€™s broken on Puppet 7 when used against a non-existent target file
  • v

    VoxBot

    04/07/2023, 12:13 PM
    so could be an augeas integration bug somewhere
  • y

    Yury Bushmelev

    04/07/2023, 12:13 PM
    actually we can โ€œfixโ€ the tests with
    file
    as I did for now
  • v

    VoxBot

    04/07/2023, 12:13 PM
    or Ruby 2.5 vs Ruby 2.7
  • y

    Yury Bushmelev

    04/07/2023, 12:14 PM
    or
    xcontext
    it
  • v

    VoxBot

    04/07/2023, 12:14 PM
    I'm not a fan of xcontext, given it really is a bug right now
  • y

    Yury Bushmelev

    04/07/2023, 12:15 PM
    yeah.. but we cannot fix in within the module ๐Ÿคท๐Ÿปโ€โ™‚๏ธ
  • s

    Slackbot

    04/07/2023, 12:47 PM
    This message was deleted.
    t
    y
    r
    • 4
    • 15
  • y

    Yury Bushmelev

    04/07/2023, 12:54 PM
    tyvm! is there any public branch I can refer to?
  • v

    VoxBot

    04/07/2023, 1:31 PM
    Ruby and it's load paths are still a mystery
  • v

    VoxBot

    04/07/2023, 1:32 PM
    *its
  • v

    VoxBot

    04/07/2023, 2:06 PM
    TIL:
    gem build
    supports --strict and --verbose
  • v

    VoxBot

    04/07/2023, 2:09 PM
    ewoud: https://github.com/voxpupuli/voxpupuli-rubocop I did a thing
  • o

    Oleksandr Lytvyn

    04/07/2023, 2:15 PM
    Hello, please advice - is there any way how to configure this (below example) with module "*puppet-nginx*" (https://forge.puppet.com/modules/puppet/nginx/readme):
    Copy code
    server {
            listen *:443 ssl;
    
    		server_name <http://puppet-webhook.example.com|puppet-webhook.example.com>;
    
            access_log /var/log/nginx/puppet-webhook-access.log;
            error_log /var/log/nginx/puppet-webhook-error.log;
    
            location /api/v1/r10k/environment {
                if ( $request_method !~ ^(POST)$ ) {
                    return 405;
                }
                proxy_pass <http://puppet.example.in:8085/api/v1/r10k/environment>;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
            }
    
        ssl_certificate /etc/ssl/certs/example.com.crt;
        ssl_certificate_key /etc/ssl/private/example.com.key;
    }
    Use-case: i have a few servers which perform a role of Nginx reverse proxy for webhooks from Bitbucket and other sources. All virtual hosts are pretty basic (nothing fancy). Right now all virtual hosts created manually. I would like to "Puppetize" configuration via
    nginx::resource::server
    Problem: i checked code of module "*puppet-nginx*" and i wasn't able to find / understand how to allow only POST request method. Because in my use-case i need to configure webhooks which perform only POST method, i would like to specifically restrict/allow POST only for additional security. Is there way how to do it? Maybe i'm missing something? Thanks PS. For "puppetlabs-apache" can see "modsec_allowed_methods" (https://github.com/puppetlabs/puppetlabs-apache/blob/113ecc03dfc986f3764a2836fe50227c5fc84253/manifests/vhost.pp#L562 & https://github.com/puppetlabs/puppetlabs-apache/blob/2aa768962418877885d2343b56a095b0811b1832/spec/defines/vhost_spec.rb#L1338) but i cannot find equivalent in "*puppet-nginx*" ๐Ÿ˜ž
  • d

    Dr Bunsen Honeydew

    04/07/2023, 2:15 PM
    See the
    puppet-nginx
    module at https://forge.puppet.com/puppet/nginx?src=slack&amp;channel=voxpupuli
  • o

    Oleksandr Lytvyn

    04/07/2023, 2:15 PM
    Hello, please advice - is there any way how to configure this (below example) with module "*puppet-nginx*" (https://forge.puppet.com/modules/puppet/nginx/readme):
    Copy code
    server {
            listen *:443 ssl;
    
    		server_name <http://puppet-webhook.example.com|puppet-webhook.example.com>;
    
            access_log /var/log/nginx/puppet-webhook-access.log;
            error_log /var/log/nginx/puppet-webhook-error.log;
    
            location /api/v1/r10k/environment {
                if ( $request_method !~ ^(POST)$ ) {
                    return 405;
                }
                proxy_pass <http://puppet.example.in:8085/api/v1/r10k/environment>;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
            }
    
        ssl_certificate /etc/ssl/certs/example.com.crt;
        ssl_certificate_key /etc/ssl/private/example.com.key;
    }
    Use-case: i have a few servers which perform a role of Nginx reverse proxy for webhooks from Bitbucket and other sources. All virtual hosts are pretty basic (nothing fancy). Right now all virtual hosts created manually. I would like to "Puppetize" configuration via
    nginx::resource::server
    Problem: i checked code of module "*puppet-nginx*" and i wasn't able to find / understand how to allow only POST request method. Because in my use-case i need to configure webhooks which perform only POST method, i would like to specifically restrict/allow POST only for additional security. Is there way how to do it? Maybe i'm missing something? Thanks PS. For "puppetlabs-apache" can see "modsec_allowed_methods" (https://github.com/puppetlabs/puppetlabs-apache/blob/113ecc03dfc986f3764a2836fe50227c5fc84253/manifests/vhost.pp#L562 & https://github.com/puppetlabs/puppetlabs-apache/blob/2aa768962418877885d2343b56a095b0811b1832/spec/defines/vhost_spec.rb#L1338) but i cannot find equivalent in "*puppet-nginx*" ๐Ÿ˜ž
  • v

    VoxBot

    04/07/2023, 2:15 PM
    welp
  • v

    VoxBot

    04/07/2023, 2:17 PM
    there's probably a raw append/prepend parameter for the location resource
  • v

    VoxBot

    04/07/2023, 2:18 PM
    https://github.com/voxpupuli/puppet-nginx/blob/master/manifests/resource/location.pp#L103
  • v

    vchepkov

    04/07/2023, 2:18 PM
    or just use
    location_custom_cfg
  • o

    Oleksandr Lytvyn

    04/07/2023, 2:21 PM
    Hmm, which of these should i select? (i know it is theoretical question, but still)
    Copy code
    Optional[Hash] $location_custom_cfg                                            = undef,
      Optional[Hash] $location_cfg_prepend                                           = undef,
      Optional[Hash] $location_cfg_append                                            = undef,
      Optional[Hash] $location_custom_cfg_prepend                                    = undef,
      Optional[Hash] $location_custom_cfg_append                                     = undef,
    
      Optional[Variant[Array[String], String]] $raw_prepend                          = undef,
      Optional[Variant[Array[String], String]] $raw_append                           = undef,
      Optional[Variant[Array[String], String]] $location_raw_prepend                 = undef,
      Optional[Variant[Array[String], String]] $location_raw_append                  = undef,
    Maybe someone previously had same case before and resolved it
  • o

    Oleksandr Lytvyn

    04/07/2023, 2:26 PM
    Hmm, which of these should i select? (i know it is theoretical question, but still)
    Copy code
    Optional[Hash] $location_custom_cfg                                            = undef,
      Optional[Hash] $location_cfg_prepend                                           = undef,
      Optional[Hash] $location_cfg_append                                            = undef,
      Optional[Hash] $location_custom_cfg_prepend                                    = undef,
      Optional[Hash] $location_custom_cfg_append                                     = undef,
    
      Optional[Variant[Array[String], String]] $raw_prepend                          = undef,
      Optional[Variant[Array[String], String]] $raw_append                           = undef,
      Optional[Variant[Array[String], String]] $location_raw_prepend                 = undef,
      Optional[Variant[Array[String], String]] $location_raw_append                  = undef,
    Maybe someone previously had same case before and resolved it
  • v

    VoxBot

    04/07/2023, 2:28 PM
    really doesn't make that much of a difference
  • v

    VoxBot

    04/07/2023, 2:29 PM
    they all add stuff to the location block
  • o

    Oleksandr Lytvyn

    04/07/2023, 2:35 PM
    Thank you, will try
  • y

    Yury Bushmelev

    04/07/2023, 2:49 PM
    try to use all of them with some comment (not a real config option) and then choose which one you like more for the task ๐Ÿ™‚
    โœ… 1
    ๐Ÿ‘ 1
  • v

    VoxBot

    04/07/2023, 2:54 PM
    ewoud: https://github.com/voxpupuli/beaker-vagrant/pull/69
1...407408409...648Latest