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

    natemccurdy

    09/23/2022, 1:30 AM
    So rather than
    Psrepository[PSGallery]{:name=>"PSGallery"}
    you can refer to it as just
    Psrepository[PSGallery]
  • n

    natemccurdy

    09/23/2022, 1:30 AM
    .that_requires()
    is a helper that extracts the name of the resource into a more easily referencable thing.
  • n

    natemccurdy

    09/23/2022, 1:32 AM
    Copy code
    it do
      <http://is_expected.to|is_expected.to> contain_package('powershell-yaml').with(
        'ensure' => '0.4.3',
        'provider' => 'windowspowershell',
        'source' => 'PSGallery',
      ).that_requires('Psrepository[PSGallery]')
    end
    👍 1
  • n

    n3snah

    09/23/2022, 1:37 AM
    excellent, thanks
  • s

    Slackbot

    09/23/2022, 3:52 AM
    This message was deleted.
    n
    d
    r
    • 4
    • 4
  • s

    Slackbot

    09/23/2022, 6:13 AM
    This message was deleted.
    t
    s
    • 3
    • 39
  • s

    sameer

    09/23/2022, 6:15 AM
    Hello, How can we start puppet agent node after removing from puppetdb......I have run puppet node purge and puppet node clean on agent and cleaned the cert on master, so that the agent record is completely removed. Now i want to add it back. When i run puppet agent it doesn't do anything
  • s

    sameer

    09/23/2022, 6:34 AM
    yaml file was also removed from fact dir in puppet master
  • m

    matt

    09/23/2022, 7:27 AM
    I'd appreciate some advice on approach/direction to make a change. I'm updating a module to add an additional parameter that will open up some functionality. I need to add an additional condition check which will vary the output on an erb template, (I'll paste the example code block in a second) I'm trying to work out the best way to add the additional condition, add it to the existing condition, or do a higher level check in an if style statement. I'm also trying to understand if I can change the value of a parameter that's then being used in a join
  • m

    matt

    09/23/2022, 7:28 AM
    <% unless @forwarders.empty? -%>
    forwarders { <%= @forwarders.join('; ') %>; };
  • m

    matt

    09/23/2022, 7:29 AM
    the code block generates a line in a bind zone file, and I'm I've added a parameter to add an optional port value
  • m

    matt

    09/23/2022, 7:30 AM
    there are multiple ways to achieve what I want to do, I'm not sure of the best approach
  • m

    matt

    09/23/2022, 7:32 AM
    where should I do the evaluation of my new parameters should I try to include it in the existing unless validation, do I do something first, eg: if forwardersport = null do the codeblock above, else do a different version of the code block
  • m

    matt

    09/23/2022, 7:34 AM
    and the join, currently that's just an IP, but if I want to add the port, do I change the forwarders value to be forwarders="$forwarders\ port { $forwardersport }" then do the join, or do I try to build up the string created by the join using the two seperate parameters (which feels more complex)
  • s

    Slackbot

    09/23/2022, 7:34 AM
    This message was deleted.
    y
    m
    • 3
    • 53
  • m

    matt

    09/23/2022, 7:47 AM
    I'll try two different approaches and see if there is a benefit/negative to either
  • s

    Slackbot

    09/23/2022, 8:03 AM
    This message was deleted.
    m
    m
    • 3
    • 11
  • s

    Slackbot

    09/23/2022, 10:24 AM
    This message was deleted.
    t
    c
    • 3
    • 3
  • p

    Puli Hari Krishna

    09/23/2022, 10:58 AM
    we are trying to proxy puppet services using cloudflare. we want user machines to reach out to open.puppet.com in public network which will proxy to internal.puppet.com. internal.puppet.com is our puppet server which is accessed only in private network(VPN) The CA is defined as internal.puppet.com and CN are machine1.internal.puppet.com
  • s

    sameer

    09/23/2022, 12:13 PM
    node 'xyz.software.com' { file { '/etc/apache2/sites-available/api.conf': ensure => present, owner => root, group => root, mode => '0644', source => 'puppet:///modules/roles/api.conf', } } The api.conf file is stored in ///modules/roles/files/api.conf and when i run puppet nothing applies.......if i change the file location to ///modules/roles/files/xyz/api.conf then this would get applied in different location in server but not in /etc/apache2/sites-available/................is there any problem wit the script?
  • m

    matt

    09/23/2022, 12:14 PM
    what is xyz
  • s

    Slackbot

    09/23/2022, 12:14 PM
    This message was deleted.
    s
    • 2
    • 1
  • s

    Slackbot

    09/23/2022, 12:15 PM
    This message was deleted.
    s
    m
    • 3
    • 31
  • m

    matt

    09/23/2022, 12:15 PM
    have I miss-understood the question ?
  • m

    matt

    09/23/2022, 1:21 PM
    is it possible to append data to a has that you're joining in an erb
  • m

    matt

    09/23/2022, 1:23 PM
    eg: <%= @param.join (':) %> creates value1value2value3 etc, could I do something like <%= @param.join "-data" (';') %> that would output value1-data;value2-data;value3-data
  • m

    matt

    09/23/2022, 1:23 PM
    something like that ? is that even possible to manipulate the output of the hash as part of the join
  • s

    Slackbot

    09/23/2022, 1:25 PM
    This message was deleted.
    y
    • 2
    • 1
  • r

    romgo

    09/23/2022, 2:40 PM
    hello, I am looking for some tips, I have a module you deployed a software on debian and redhat. package is not available on a repository, so we ship with the module with the deb and rpm, deploy it on the server has a file, then use a package statement to ensure package will be installed
  • r

    romgo

    09/23/2022, 2:41 PM
    This looks like this :
    Copy code
    package { 'taniumclient':
          name     => $name_pck,
          ensure   => present,
          provider => $provider,
          source   => "${puppet_tanium::install_path}/${package_name}",
          require  => File["${puppet_tanium::install_path}/${package_name}"],
        }
    where $name_pck has been defined for redhat and debian has taniumclient_7.4.7.1094-debian10_amd64.deb & TaniumClient-7.4.8.1054-1.rhe7.x86_64.rpm
1...172173174...428Latest