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

    Joel Wilson

    01/13/2023, 9:33 PM
    Or not
  • n

    natemccurdy

    01/13/2023, 9:34 PM
    That depends on what
    modulepath
    is when Puppet is running. The
    bsemodulepath
    setting tells Puppet where the global modules are: https://www.puppet.com/docs/puppet/7/configuration.html#basemodulepath The
    modulepath
    setting tells Puppet the complete order of where to look for modules when compiling a catalog. First module found in the path wins. And the standard value for
    modulepath
    (standard by convention) is
    site-modules:modules:$basemodulepath
    , which means that environment-specific modules win over global modules. See https://github.com/puppetlabs/control-repo/blob/production/environment.conf#L1
  • n

    natemccurdy

    01/13/2023, 9:34 PM
    That depends on what
    modulepath
    is when Puppet is running. The
    bsemodulepath
    setting tells Puppet where the global modules are: https://www.puppet.com/docs/puppet/7/configuration.html#basemodulepath The
    modulepath
    setting tells Puppet the complete order of where to look for modules when compiling a catalog. First module found in the path wins. And the standard setting for that (standard by convention) is
    site-modules:modules:$basemodulepath
    , which means that environment-specific modules win over global modules. See https://github.com/puppetlabs/control-repo/blob/production/environment.conf#L1
  • n

    natemccurdy

    01/13/2023, 9:36 PM
    So, for example, if you wanted to flip the convention and make global modules win over environment-specific modules, you'd run Puppet apply with something like:
    Copy code
    sudo puppet apply control-repo/manifests/site.pp --modulepath '$basemodulepath:control-repo/site-modules:control-repo/modules'
  • j

    Joel Wilson

    01/13/2023, 9:37 PM
    Ok. Thanks
  • n

    natemccurdy

    01/13/2023, 9:37 PM
    That depends on what
    modulepath
    is when Puppet is running. The
    bsemodulepath
    setting tells Puppet where the global modules are: https://www.puppet.com/docs/puppet/7/configuration.html#basemodulepath The
    modulepath
    setting tells Puppet the complete order of where to look for modules when compiling a catalog. First module found in the path wins. And the standard value for
    modulepath
    (standard by convention) is
    site-modules:modules:$basemodulepath
    , which means that environment-specific modules win over global modules. See https://github.com/puppetlabs/control-repo/blob/production/environment.conf#L1
  • l

    Lumiere

    01/13/2023, 10:19 PM
    a lot of people don't actually use basemodulepath
  • l

    Lumiere

    01/13/2023, 10:19 PM
    but I find it to be great for allowing multiple applications to use the same puppet env
  • l

    Lumiere

    01/13/2023, 10:20 PM
    basemodulepath for shared infra modules and environmentpath for each application's specific tooling
  • s

    Slackbot

    01/13/2023, 10:43 PM
    This message was deleted.
    👍🏻 1
    n
    b
    • 3
    • 2
  • n

    natemccurdy

    01/13/2023, 10:47 PM
    Using this manifest:
    Copy code
    notice("server_facts is: ${server_facts}")
    notice("servername is: ${servername}")
    With this change, it's got all the info I'd expect:
    Copy code
    ~/src/puppetlabs/puppet [add_all_server_facts_to_apply]$ be puppet apply ~/foo.pp                                                                                                        
    Notice: Scope(Class[main]): server_facts is: {serverversion => 6.29.0, servername => laptop.local, serverip => 10.0.0.17, serverip6 => fe80::178d:e46:e111:c327, environment => production}
    Notice: Scope(Class[main]): servername is: laptop.local
    Notice: Compiled catalog for adot.local in environment production in 0.01 seconds
    Notice: Applied catalog in 0.01 seconds
    Without this change, server_facts only has `environment`:
    Copy code
    ~/src/puppetlabs/puppet [add_all_server_facts_to_apply ]$ puppet apply ~/foo.pp                                                                                                           
    Notice: Scope(Class[main]): server_facts is: {environment => production}
    Warning: Unknown variable: 'servername'. (file: /Users/nate/foo.pp, line: 2, column: 26)
    Notice: Scope(Class[main]): servername is:
    Notice: Compiled catalog for laptop.local in environment production in 0.02 seconds
    Notice: Applied catalog in 0.01 seconds
  • a

    Animesh Sahu

    01/14/2023, 10:07 AM
    Why is self.instances method not instance method in puppet providers? I couldn't use variables passed on via resources, I would like to specify the custom binary path from resource.
  • s

    Slackbot

    01/14/2023, 1:43 PM
    This message was deleted.
    h
    t
    y
    • 4
    • 15
  • t

    tragiccode

    01/14/2023, 1:43 PM
    Hey Everyone, I could use some help. I'm the maintainer of https://forge.puppet.com/modules/tragiccode/azure_key_vault and i had a bug report as shown here https://github.com/TraGicCode/tragiccode-azure_key_vault/issues/101 I was able to reproduce the bug but i can't figure out how to solve it OR of it's a limitation in puppet Summary: I have a hiera lookup function that calls out to azure key vault, retrieves the secret, and returns it not as a
    String
    but of type
    Sensitive[String]
    ( https://github.com/TraGicCode/tragiccode-azure_key_vault/blob/c158fe763716a1d873ad[…]23a60bdfcf1e52f8/lib/puppet/functions/azure_key_vault/lookup.rb ). ------------------------------------------------------------------------ When the user does a lookup in their puppet file like this, it works perfectly fine.
    Copy code
    $password = lookup('my-secret')
    
    file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
      ensure  => file,
      content => $password,
    }
    ------------------------------------------------------------------------ When the user does a lookup call inside their common.yaml file it doesn't work. code shown below Common.yaml
    Copy code
    profile::akv::sensitive_admin_password: "%{lookup('my-secret')}"
    site.pp
    Copy code
    class profile::akv (
      Sensitive[String] $sensitive_admin_password,
    ) {
    
      file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
        ensure  => file,
        content => $sensitive_admin_password.unwrap,
      }
    
    }
    
    include profile::akv
    This is what ends up in the azure-key-vault-test.txt file which looks like someone did a ToString on a value wrapped on a Sensitive type. Does anyone know how to fix this or if i must change my puppet function to not return a
    Sensitive[String]
    in order for this to work?
  • t

    tragiccode

    01/14/2023, 1:43 PM
    Hey Everyone, I could use some help. I'm the maintainer of https://forge.puppet.com/modules/tragiccode/azure_key_vault and i had a bug report as shown here https://github.com/TraGicCode/tragiccode-azure_key_vault/issues/101 I was able to reproduce the bug but i can't figure out how to solve it OR of it's a limitation in puppet Summary: I have a hiera lookup function that calls out to azure key vault, retrieves the secret, and returns it not as a
    String
    but of type
    Sensitive[String]
    ( https://github.com/TraGicCode/tragiccode-azure_key_vault/blob/c158fe763716a1d873ad[…]23a60bdfcf1e52f8/lib/puppet/functions/azure_key_vault/lookup.rb ). ------------------------------------------------------------------------ When the user does a lookup in their puppet file like this, it works perfectly fine.
    Copy code
    $password = lookup('my-secret')
    
    file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
      ensure  => file,
      content => $password,
    }
    ------------------------------------------------------------------------ When the user does a lookup call inside their common.yaml file it doesn't work. code shown below Common.yaml
    Copy code
    profile::akv::sensitive_admin_password: "%{lookup('my-secret')}"
    site.pp
    Copy code
    class profile::akv (
      Sensitive[String] $sensitive_admin_password,
    ) {
    
      file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
        ensure  => file,
        content => $sensitive_admin_password,
      }
    
    }
    
    include profile::akv
    This is what ends up in the azure-key-vault-test.txt file which looks like someone did a ToString on a value wrapped on a Sensitive type. Does anyone know how to fix this or if i must change my puppet function to not return a
    Sensitive[String]
    in order for this to work?
  • t

    tragiccode

    01/14/2023, 1:49 PM
    Hey Everyone, I could use some help. I'm the maintainer of https://forge.puppet.com/modules/tragiccode/azure_key_vault and i had a bug report as shown here https://github.com/TraGicCode/tragiccode-azure_key_vault/issues/101 I was able to reproduce the bug but i can't figure out how to solve it OR of it's a limitation in puppet Summary: I have a hiera lookup function that calls out to azure key vault, retrieves the secret, and returns it not as a
    String
    but of type
    Sensitive[String]
    ( https://github.com/TraGicCode/tragiccode-azure_key_vault/blob/c158fe763716a1d873ad[…]23a60bdfcf1e52f8/lib/puppet/functions/azure_key_vault/lookup.rb ). ------------------------------------------------------------------------ When the user does a lookup in their puppet file like this, it works perfectly fine.
    Copy code
    $password = lookup('my-secret')
    
    file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
      ensure  => file,
      content => $password,
    }
    ------------------------------------------------------------------------ When the user does a lookup call inside their common.yaml file it doesn't work. code shown below Common.yaml
    Copy code
    profile::akv::sensitive_admin_password: "%{lookup('my-secret')}"
    site.pp
    Copy code
    class profile::akv (
      Sensitive[String] $sensitive_admin_password,
    ) {
    
      file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
        ensure  => file,
        content => $sensitive_admin_password,
      }
    
    }
    
    include profile::akv
    This is what ends up in the azure-key-vault-test.txt file which looks like someone did a ToString on a value wrapped on a Sensitive type. azure-key-vault-test.txt
    Copy code
    Sensitive [value redacted]
    Does anyone know how to fix this or if i must change my puppet function to not return a
    Sensitive[String]
    in order for this to work?
  • s

    Slackbot

    01/14/2023, 3:14 PM
    This message was deleted.
    c
    r
    • 3
    • 6
  • c

    cruelsmith

    01/14/2023, 3:27 PM
    The package resource has multiple values for
    ensure
    . For your case you will properly want
    installed
    to just ensure via puppet that the package in installed but not be raised the version when a new package is available. https://www.puppet.com/docs/puppet/7/types/package.html#package-attribute-ensure
  • c

    cruelsmith

    01/14/2023, 3:35 PM
    The package resource has multiple values for
    ensure
    . For your case you will properly want
    installed
    to just ensure via puppet that the package in installed but not be raised or lower the version when a new package is available. https://www.puppet.com/docs/puppet/7/types/package.html#package-attribute-ensure
  • r

    romgo

    01/14/2023, 8:51 PM
    I might be stuck. because currently we use the ensure to fix a given version smoething like :
    Copy code
    'dotnet-runtime':
        ensure : '6.0.11'
        provider : 'chocolatey'
  • r

    romgo

    01/14/2023, 8:51 PM
    I might be stuck. because currently we use the ensure to fix a given version smoething like :
    Copy code
    windows::package:'dotnet-runtime':
        ensure : '6.0.11'
        provider : 'chocolatey'
  • r

    romgo

    01/14/2023, 8:51 PM
    I might be stuck. because currently we use the ensure to fix a given version smoething like :
    Copy code
    windows::package:
      'dotnet-runtime':
        ensure : '6.0.11'
        provider : 'chocolatey'
  • r

    romgo

    01/14/2023, 8:52 PM
    I might be stuck. because currently we use the ensure to fix a given version smoething like :
    Copy code
    windows::package:
      'dotnet-runtime':
        ensure : '6.0.11'
        provider : 'chocolatey'
    But I just check the cholotaye repository. I'm pretty sure that if I only use present chocolatey will install latest version of the package available - which is dotnet 7.
  • s

    Slackbot

    01/14/2023, 8:55 PM
    This message was deleted.
    b
    j
    • 3
    • 3
  • j

    Joe

    01/14/2023, 8:55 PM
    Copy code
    await page.mouse.move(bounding.x + (bounding.width/2), bounding.y + (bounding.height/2), {"steps": getRandomInt(50,200)})
  • j

    Joe

    01/14/2023, 8:55 PM
    Example
  • j

    Joe

    01/14/2023, 8:56 PM
    This doesn't run until the window is in view of the screen
  • j

    Joe

    01/14/2023, 8:56 PM
    Is there a way to make it work?
  • t

    tragiccode

    01/14/2023, 11:03 PM
    My PDK release prep is taking over 20+ minutes in github actions. Is this a known issue anyone is aware of?
  • t

    tragiccode

    01/14/2023, 11:03 PM
    https://github.com/TraGicCode/tragiccode-azure_key_vault/actions/runs/3920437204/jobs/6702065121
1...274275276...428Latest