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

    bastelfreak

    04/26/2022, 7:35 PM
    do you need the value from the certificate or would normal facts work as well
  • b

    bastelfreak

    04/26/2022, 7:35 PM
    the networking.domain fact provides that information as well
  • r

    Robert Emanuele

    04/26/2022, 7:37 PM
    true. in this case for configuring a machine using puppet apply, i may want to set that value. the certname is the most reliable as this is standing up foreman, puppet master, etc.
  • b

    bastelfreak

    04/26/2022, 7:40 PM
    "depends" :D
  • b

    bastelfreak

    04/26/2022, 7:40 PM
    the calue in the cert is written once
  • b

    bastelfreak

    04/26/2022, 7:41 PM
    and the actual domain can change later and the cert/trusted facts wint reflect that
  • b

    bastelfreak

    04/26/2022, 7:42 PM
    what you can do is use the networking.domain fact and check if that is != trusted.domain
  • b

    bastelfreak

    04/26/2022, 7:42 PM
    and then call fail()
  • r

    Robert Emanuele

    04/26/2022, 7:52 PM
    probably right… bit of a chicken and egg here
  • j

    jhoblitt

    04/26/2022, 8:59 PM
    Do we have an equivalent to
    knockout_prefix
    for hashes yet? Seems like I run into this every couple of months.
  • j

    jhoblitt

    04/26/2022, 8:59 PM
    Do we have an equivalent to
    knockout_prefix
    for hashes yet? Seems like I run into this every couple of months.
  • s

    Slackbot

    04/26/2022, 9:15 PM
    This message was deleted.
    j
    • 2
    • 1
  • j

    jhoblitt

    04/26/2022, 9:15 PM
    https://puppet.com/docs/puppet/7/hiera_merging.html could use some clarification
  • d

    Dr Bunsen Honeydew

    04/26/2022, 9:45 PM
    businessparrot 🧑‍🏫 Bolt is about to start up in #CFD8Z9A4T
  • s

    Slackbot

    04/26/2022, 11:35 PM
    This message was deleted.
    y
    • 2
    • 1
  • y

    Yorokobi

    04/27/2022, 12:23 AM
    If the architecture is supported, the instructions are the same.
  • c

    Colin

    04/27/2022, 6:28 AM
    Good morning ☕ I've created an PR for the firewall module (https://github.com/puppetlabs/puppetlabs-firewall/pull/1048) and would like to ask if someone could help me with implementing some test cases for it. I am not that experienced with this topic yet.
  • c

    Colin

    04/27/2022, 6:29 AM
    message has been deleted
  • s

    Slackbot

    04/27/2022, 8:05 AM
    This message was deleted.
    a
    m
    y
    • 4
    • 14
  • m

    Marty Ewings

    04/27/2022, 8:38 AM
    Anyone any experience with the match function? im doing this: $master_match = $profiles.match(/Master/) i would expect $master_match to either contain undef or [Master] whats it does is assign the content of $profiles with the literal string .match(/Master/) appended to the end
  • m

    Marty Ewings

    04/27/2022, 9:08 AM
    ah ok its not returning undef its returning ‘[]’ and its an array 🤦
  • m

    Marty Ewings

    04/27/2022, 9:10 AM
    ah ok it is returning undef but in an array an array 🤦
  • m

    Marty Ewings

    04/27/2022, 9:10 AM
    ah ok it is returning undef but in an array 🤦
  • m

    Marty Ewings

    04/27/2022, 10:14 AM
    message has been deleted
  • m

    Marty Ewings

    04/27/2022, 10:14 AM
    message has been deleted
  • m

    Marty Ewings

    04/27/2022, 10:14 AM
    message has been deleted
  • m

    Marty Ewings

    04/27/2022, 10:14 AM
    message has been deleted
  • s

    Slackbot

    04/27/2022, 11:58 AM
    This message was deleted.
    ❤️ 1
    t
    • 2
    • 1
  • m

    Massimiliano (Max)

    04/27/2022, 1:33 PM
    I'm not the best ruby programmer, hence here we go:
    Copy code
    Puppet::Functions.create_function(:'XXXX_iptables::combine_ip_port') do
      dispatch :combine_elements do
        param 'Array', :networks
        param 'Array', :ports
        return_type 'Array'
      end
    
      def combine_elements(networks, ports)
        length_networks = networks.length
        result = []
        net_hash = {}
        (1..length_networks).each do |net_count|
          array_count = net_count - 1
          net_hash[net_count] = ports.map { |string| "#{networks[array_count]},#{string}" }
        end
        net_hash.each do |net_key, _net_value|
          result.push(net_hash[net_key])
        end
    
        result.flatten
      end
    end
  • s

    Slackbot

    04/28/2022, 7:42 AM
    This message was deleted.
    a
    t
    e
    • 4
    • 7
1...91011...428Latest