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

    it is just display name

    07/18/2022, 6:06 PM
    Hello, I need assistance in creating a Puppet yaml file that generates the following file:
    Copy code
    gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
    gitlab_rails['omniauth_block_auto_created_users'] = true
    gitlab_rails['omniauth_auto_link_saml_user'] = true
    gitlab_rails['omniauth_providers'] = [
      {
        name: "saml",
        label: "Provider name", # optional label for login button, defaults to "Saml"
        args: {
          allowed_clock_drift: 1,  # for one second clock drift
          attribute_statements: { nickname: ['username'] },
          assertion_consumer_service_url: "<https://gitlab.example.com/users/auth/saml/callback>",
          idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
          idp_sso_target_url: "<https://login.example.com/idp>",
          issuer: "<https://gitlab.example.com>",
          name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
        }
      }
    ]
    I created a the following Puppet yaml file
    Copy code
    gitlab::gitlab_rails:
      omniauth_allow_single_sign_on: ['saml']
      omniauth_auto_link_saml_user: true
      omniauth_block_auto_created_users: true
      omniauth_providers: [{name: "saml", label: "NRAS Token", args: {allowed_clock_drift: 1, attribute_statements: { nickname: ['username'] }, assertion_consumer_service_url: "<https://gitlab.example.com/users/auth/saml/callback>", idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", idp_sso_target_url: "<https://login.example.com/idp>", issuer: "<https://gitlab.example.com>", name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"}}]
    which caused Puppet to generate the following file:
    Copy code
    gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
    gitlab_rails['omniauth_auto_link_saml_user'] = true
    gitlab_rails['omniauth_block_auto_created_users'] = true
    gitlab_rails['omniauth_providers'] = [{"args"=>{"allowed_clock_drift"=>2, "assertion_consumer_service_url"=>"<https://gitlab.example.com/users/auth/saml/callback>", "attribute_statements"=>{"nickname"=>["username"]}, "idp_cert_fingerprint"=>"43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", "idp_sso_target_url"=>"<https://login.example.com/idp>", "issuer"=>"<https://gitlab.example.com>", "name_identifier_format"=>"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"}, "label"=>"Provider name", "name"=>"saml"}]
    The generated file is fine except for the last line, 'omniauth_providers'. It doesn't match completely with the desired one: 1) argument names are double-quoted when they should not. 2) argument names and values are separated by '=>' instead of ': ' (colon blank) What is the correct Puppet syntax to use that eliminated the above two mismatches?
  • i

    it is just display name

    07/18/2022, 6:08 PM
    Hello, I need assistance in creating a Puppet yaml file that generates the following file:
    Copy code
    gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
    gitlab_rails['omniauth_block_auto_created_users'] = true
    gitlab_rails['omniauth_auto_link_saml_user'] = true
    gitlab_rails['omniauth_providers'] = [
      {
        name: "saml",
        label: "Provider name", # optional label for login button, defaults to "Saml"
        args: {
          allowed_clock_drift: 1,  # for one second clock drift
          attribute_statements: { nickname: ['username'] },
          assertion_consumer_service_url: "<https://gitlab.example.com/users/auth/saml/callback>",
          idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
          idp_sso_target_url: "<https://login.example.com/idp>",
          issuer: "<https://gitlab.example.com>",
          name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
        }
      }
    ]
    I created a the following Puppet yaml file
    Copy code
    gitlab::gitlab_rails:
      omniauth_allow_single_sign_on: ['saml']
      omniauth_auto_link_saml_user: true
      omniauth_block_auto_created_users: true
      omniauth_providers: [{name: "saml", label: "NRAS Token", args: {allowed_clock_drift: 1, attribute_statements: { nickname: ['username'] }, assertion_consumer_service_url: "<https://gitlab.example.com/users/auth/saml/callback>", idp_cert_fingerprint: "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", idp_sso_target_url: "<https://login.example.com/idp>", issuer: "<https://gitlab.example.com>", name_identifier_format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"}}]
    which caused Puppet to generate the following file:
    Copy code
    gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
    gitlab_rails['omniauth_auto_link_saml_user'] = true
    gitlab_rails['omniauth_block_auto_created_users'] = true
    gitlab_rails['omniauth_providers'] = [{"args"=>{"allowed_clock_drift"=>2, "assertion_consumer_service_url"=>"<https://gitlab.example.com/users/auth/saml/callback>", "attribute_statements"=>{"nickname"=>["username"]}, "idp_cert_fingerprint"=>"43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", "idp_sso_target_url"=>"<https://login.example.com/idp>", "issuer"=>"<https://gitlab.example.com>", "name_identifier_format"=>"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"}, "label"=>"Provider name", "name"=>"saml"}]
    The generated file is fine except for the last line, 'omniauth_providers'. It doesn't match completely with the desired one: 1) argument names are double-quoted when they should not. 2) argument names and values are separated by '=>' instead of ': ' (colon blank) What is the correct Puppet syntax to use that eliminated the above two mismatches?
  • l

    Lumiere

    07/18/2022, 6:36 PM
    https://forge.puppet.com/modules/puppetlabs/stdlib/reference#to_json_pretty
  • k

    kenyon

    07/18/2022, 8:39 PM
    unattended-upgrades has this already. use puppet/unattended_upgrades to configure.
  • k

    kenyon

    07/18/2022, 8:40 PM
    unattended-upgrades has this already. use puppet/unattended_upgrades to configure. https://forge.puppet.com/modules/puppet/unattended_upgrades
  • s

    Slackbot

    07/18/2022, 11:37 PM
    This message was deleted.
    moderator 1
    b
    • 2
    • 1
  • p

    Paul Gureghian

    07/19/2022, 12:37 AM
    HI. is this channel active?
    👍 1
    đź’Ż 1
  • s

    Sarah Tran

    07/19/2022, 12:39 AM
    message has been deleted
  • p

    Paul Gureghian

    07/19/2022, 12:39 AM
    Should I install Puppet, Puppet Agent, Puppet Server ?
  • v

    vchepkov

    07/19/2022, 12:40 AM
    of course 🙂
  • v

    vchepkov

    07/19/2022, 12:40 AM
    of course 🙂
  • v

    vchepkov

    07/19/2022, 12:41 AM
    But puppet agent comes with puppet
  • p

    Paul Gureghian

    07/19/2022, 12:43 AM
    Is Puppet Agent same as Puppet ?
  • v

    vchepkov

    07/19/2022, 12:44 AM
    not really. Puppet Agent is collection of several components, one of them is Puppet
  • v

    vchepkov

    07/19/2022, 12:46 AM
    https://puppet.com/docs/puppet/6/platform.html
  • p

    Paul Gureghian

    07/19/2022, 12:46 AM
    I installed puppet with sudo apt install puppet (5.5.22) and then I installed puppetserver 6 from the .deb file and it conflicts.
  • v

    vchepkov

    07/19/2022, 12:48 AM
    read that document I sent you. you have to use 'platform' properly. puppetserver 6 requires puppet 6
  • p

    Paul Gureghian

    07/19/2022, 12:49 AM
    does the doc cover installing puppet 6 ?
  • v

    vchepkov

    07/19/2022, 12:49 AM
    yes
  • p

    Paul Gureghian

    07/19/2022, 12:49 AM
    ok, thanks
  • v

    vchepkov

    07/19/2022, 12:50 AM
    https://puppet.com/docs/puppet/6/server/install_from_packages.html
  • v

    vchepkov

    07/19/2022, 12:51 AM
    I would start with some Learning machine before go that deep though.
  • v

    vchepkov

    07/19/2022, 12:52 AM
    https://puppet.com/try-puppet/puppet-learning-vm/
  • p

    Paul Gureghian

    07/19/2022, 1:34 AM
    If I just install puppet6-release-focal.deb will that cover puppet, puppet-agent, puppetserver ?
  • p

    Paul Gureghian

    07/19/2022, 4:07 AM
    How to get Puppet commands in the terminal?
  • y

    Yorokobi

    07/19/2022, 4:09 AM
    Add
    /opt/puppetlabs/bin
    to the $PATH variable.
    export PATH=$PATH:/opt/puppetlabs/bin
    Sometimes this is done automatically and all you have to do is logout and back in or run
    bash
  • s

    Slackbot

    07/19/2022, 1:12 PM
    This message was deleted.
    v
    r
    +3
    • 6
    • 145
  • v

    vchepkov

    07/19/2022, 1:31 PM
    https://github.com/puppetlabs/puppetlabs-apache/blob/main/examples/vhost_proxypass.pp
  • v

    vchepkov

    07/19/2022, 1:34 PM
    those are just different examples, the point is, ProxyPass belongs to a virtual host
  • r

    runlolarun

    07/19/2022, 1:56 PM
    but profile:apache:vhost is on the “parent” apache host and on “proxy” apache host, so the same information is duplicated?
1...9899100...428Latest