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

    Slackbot

    05/25/2022, 7:46 PM
    This message was deleted.
    w
    j
    • 3
    • 4
  • r

    Ryan Pillay

    05/25/2022, 8:52 PM
    Anyone know what this error is about?
    Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not parse for environment production: This Name has no effect. A value was produced and then forgotten (one or more preceding expressions may have the wrong form) (file: /etc/puppetlabs/code/environments/production/manifests/site.pp, line: 98, column: 1) on node
    Here's my
    site.pp
    , it seems it doesn't like the
    sudoers
    class yet the
    asterisk
    applies fine
    node '<http://puppet.mydomain.com|puppet.mydomain.com>' {
    include 'agent_config'
    include 'euhosts'
    class {"asterisk":astVer =>'ast18'}
    class {"sudoers":os=>'rhel7'}
    }
  • n

    natemccurdy

    05/25/2022, 9:13 PM
    Which line is line 98?
  • r

    RobDog

    05/25/2022, 10:04 PM
    (one or more preceding expressions may have the wrong form) it states line 98 , column 1 , so could be an issue with Braces or the preceding line
  • l

    Lumiere

    05/25/2022, 10:06 PM
    as a note, those class calls don't follow best practice for puppet, makes them hard to read/debug for a lot of us
    Copy code
    class {"asterisk":
      astVer => 'ast18',
    }
    is the way that will help people read your code quickly
    โž• 1
  • l

    Lumiere

    05/25/2022, 10:06 PM
    as a note, those class calls don't follow best practice for puppet, makes them hard to read/debug for a lot of us
    Copy code
    class {"asterisk":
      astVer => 'ast18',
    }
    is the way that will help people read your code quickly
  • n

    natemccurdy

    05/25/2022, 10:30 PM
    Also, class parameters canโ€™t have uppercase letters in them: https://puppet.com/docs/puppet/7/lang_reserved.html#lang_acceptable_char-parameter-names
  • f

    friedbob

    05/26/2022, 3:17 PM
    Does the puppet agent support any sort of MFA for sudo? Such as SAML? I don't know the details of what is expected yet, just trying to prepare and answer some questions asked of me
  • s

    Slackbot

    05/26/2022, 3:19 PM
    This message was deleted.
    v
    l
    +2
    • 5
    • 13
  • f

    friedbob

    05/26/2022, 3:21 PM
    That's right... I had forgotten that. It's been a long week or two
  • l

    Lumiere

    05/26/2022, 3:21 PM
    I'm with you
  • l

    Lumiere

    05/26/2022, 3:22 PM
    if you're in the US, maybe a 3 day weekend ๐Ÿ˜„
    ๐Ÿ‘๐Ÿผ 1
  • d

    Dr Bunsen Honeydew

    05/26/2022, 5:45 PM
    businessparrot ๐Ÿง‘โ€๐ŸซPuppet Forge is about to start up in #CFD8Z9A4T
  • j

    Jonathon Anderson

    05/26/2022, 6:17 PM
    --debug
    isn't showing the command being executed for an exec resource with powershell provider. Any way to get that output?
  • b

    binford2k

    05/26/2022, 6:27 PM
    @Jonathon Anderson could you share the code?
  • j

    Jonathon Anderson

    05/26/2022, 6:30 PM
    @binford2k
    Copy code
    exec { 'Azure Arc Registration':
        command  => "& C:\\Installs\\AzureArc\\Register-ArcServer.ps1 -WorkloadName ${workload_name} -Criticality ${criticality} -Environment ${environment} -StartDate ${start_date} -CreatedBy ${created_by}",
        unless   => '& C:\\Installs\\AzureArc\\Register-ArcServer.ps1 -Check',
        cwd      => 'C:\\Installs\\AzureArc',
        provider => 'powershell',
    
        require  => File['Azure Arc Registration Script'],
      }
  • h

    hbui

    05/26/2022, 6:32 PM
    the exec may not run if the
    unless
    runs successfully
  • j

    Jonathon Anderson

    05/26/2022, 6:32 PM
    I'm getting this message
    Copy code
    Notice: /Stage[main]/arc::Windows/Exec[Azure Arc Registration]/returns: executed successfully (corrective)
  • j

    Jonathon Anderson

    05/26/2022, 6:32 PM
    but the installer doesn't seem to be installing
  • j

    Jonathon Anderson

    05/26/2022, 6:33 PM
    in fact, the script should download the installation file, and the file is not downloading either, but when I step through the script, it downloads
  • b

    binford2k

    05/26/2022, 6:33 PM
    I donโ€™t know the call operator much, but it says that it executes code in a child scope. Iโ€™m not completely sure what that means to Powershell
  • j

    Jonathon Anderson

    05/26/2022, 6:33 PM
    in fact, the script should download the installation file, and the file is not downloading either, but when I step through the script, it downloads
  • d

    Dean

    05/26/2022, 6:33 PM
    i think you may need the logoutput parameter
    โ˜๏ธ 1
  • h

    hbui

    05/26/2022, 6:33 PM
    if it works as a user but not as the puppet agent, then likely there's an environment variable that is not the same
  • b

    binford2k

    05/26/2022, 6:34 PM
    https://puppet.com/docs/puppet/latest/types/exec.html#exec-attribute-logoutput
  • j

    Jonathon Anderson

    05/26/2022, 6:35 PM
    trying that
  • j

    Jonathon Anderson

    05/26/2022, 6:42 PM
    derp... well that helped a lot... it's always something obvious
    ๐ŸŽ‰ 2
  • s

    Serin Abraham

    05/27/2022, 1:21 AM
    hey folks, I got to replace a value in a config file for a condition as below. it worked but doesn't seems to me the best way just to replace one value. any suggestions using file_line or something else? thanks! if $facts['datacenter'] == 'xyz' { $remoteconf = 'puppet:///modules/profile/etc/rsyslog.d/remote-1.conf' } else { $remoteconf = 'puppet:///modules/profile/etc/rsyslog.d/remote-2.conf' }
  • l

    Lumiere

    05/27/2022, 1:28 AM
    Use hiera to set the variable then use file_line, augeas, or inifile to set the variable
  • y

    Yorokobi

    05/27/2022, 1:28 AM
    Depending on the complexity, epp() may be the way to go
1...525354...428Latest