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

    binford2k

    08/04/2022, 11:07 PM
    see how the
    -
    that you had in before make it an array of hashes
    šŸ™Œ 1
  • b

    binford2k

    08/04/2022, 11:08 PM
    take them out and you get a cleaner hash where ā€˜developmentb’ is a key with attributes under it
  • b

    binford2k

    08/04/2022, 11:08 PM
    take them out and you get a cleaner hash where ā€˜developmentb’ is a key with attributes under it
  • p

    Patrick Rynhart

    08/04/2022, 11:08 PM
    Thanks guys - got it working
  • b

    binford2k

    08/04/2022, 11:08 PM
    get the data working the way you want. then look at the code to use the data
    this 1
  • p

    Patrick Rynhart

    08/04/2022, 11:09 PM
    A bit rough on Puppet / Hiera data types šŸ˜„. I will try and study what you’ve explained above.
  • b

    binford2k

    08/04/2022, 11:09 PM
    šŸ‘
  • p

    Patrick Rynhart

    08/04/2022, 11:10 PM
    And you’re absolutely right @binford2k - trying to pack in data associated with different instances
  • b

    binford2k

    08/04/2022, 11:11 PM
    it’s almost always easiest to work on getting clean data first. And it’s always going to be easiest to break problems into discrete pieces and making sure each part works as expected rather than poking at all of it all the time.
    šŸ‘ 1
  • b

    binford2k

    08/04/2022, 11:13 PM
    (easier said than done, of course šŸ˜†)
    šŸ˜… 1
  • p

    Patrick Rynhart

    08/04/2022, 11:15 PM
    Very much appreciate the help all šŸ™‚
  • p

    Patrick Rynhart

    08/04/2022, 11:21 PM
    For someone who struggles with Hiera generally, maybe I should get into HDM (which was a suggestion above)
  • b

    Brian Schonecker

    08/04/2022, 11:24 PM
    Don't sweat it. I have been using Puppet and Ansible for years and I still can't tell you what a hash/dict or array/list looks like without thinking hard about it.
    ā¤ļø 2
  • s

    Slackbot

    08/04/2022, 11:25 PM
    This message was deleted.
    b
    p
    b
    • 4
    • 12
  • b

    Brian Schonecker

    08/04/2022, 11:25 PM
    hahahh....that's sounds like cheating to me. šŸ˜‰
    šŸ˜… 2
  • p

    Patrick Rynhart

    08/04/2022, 11:33 PM
    @vchepkov - Would something like this be good practise:
    Copy code
    value.each do |k, v|
  • p

    Patrick Rynhart

    08/04/2022, 11:33 PM
    (I know they’re just variables that you can call anything you’d like, but after studying things a bit, I believe that in this case we’re dealing with keys [ā€œdevelopmentbā€, ā€œdevelopmentcā€ etc] and values associated with those keys.)
  • s

    Slackbot

    08/05/2022, 8:18 AM
    This message was deleted.
    b
    s
    • 3
    • 29
  • s

    sh6624gsj8

    08/05/2022, 8:21 AM
    Hello Puppet / Hiera begineer here , I have a variable (http2) in my hiera file :-
    Copy code
    haproxy::services::options:
    http2 = true
    which I would like to map in my puppet template with a conditional statement like :-
    Copy code
    <% if http2 == true -%>
      option http-use-htx
    <% end -%>
    but I don't think my puppet run understand that I am pointing to this variable . How can I map this correctly in my erb file?
  • s

    sh6624gsj8

    08/05/2022, 8:23 AM
    Hello Puppet / Hiera begineer here , I have a variable (http2) in my hiera file :-
    Copy code
    haproxy::services:
    http2 = true
    which I would like to map in my puppet template with a conditional statement like :-
    Copy code
    <% if http2 == true -%>
      option http-use-htx
    <% end -%>
    but I don't think my puppet run understand that I am pointing to this variable . How can I map this correctly in my erb file?
  • s

    sh6624gsj8

    08/05/2022, 8:33 AM
    to be precise the hiera looks like :-
    Copy code
    haproxy::service_default:
      port: 443
      mode: 'http'
      http2: true
      http1_1: true
    and in my template I would like to only enable an option if http2 is true - in this way :-
    Copy code
    <% if http2 == true -%>
      option http-use-htx
    <% end -%>
  • s

    sh6624gsj8

    08/05/2022, 8:35 AM
    to be precise the hiera looks like :-
    Copy code
    dummy_haproxy::service_default:
      port: 443
      mode: 'http'
      http2: true
      http1_1: true
    and in my template I would like to only enable an option if http2 is true - in this way :-
    Copy code
    <% if http2 == true -%>
      option http-use-htx
    <% end -%>
  • s

    sh6624gsj8

    08/05/2022, 8:35 AM
    Hello Puppet / Hiera begineer here , I have a variable (http2) in my hiera file :-
    Copy code
    dummy_haproxy::services:
    http2 = true
    which I would like to map in my puppet template with a conditional statement like :-
    Copy code
    <% if http2 == true -%>
      option http-use-htx
    <% end -%>
    but I don't think my puppet run understand that I am pointing to this variable . How can I map this correctly in my erb file?
  • s

    sh6624gsj8

    08/05/2022, 8:41 AM
    message has been deleted
  • s

    Slackbot

    08/05/2022, 11:47 AM
    This message was deleted.
    a
    b
    • 3
    • 13
  • j

    Joost

    08/05/2022, 1:32 PM
    I don’t think it’s pointless if you’d have to set up an HA setup in K8s and make sure that some persistent volumes contain the puppet code the servers will use for catalog compilation
  • b

    Brian Schonecker

    08/05/2022, 3:12 PM
    Looking for advice on what module to use to manage a custom YUM/RPM repo (internally) and module to mange a repo mirror for EPEL (and others). Arden Local RPM Repo looked promising but I don't quite understand the tar source setup. A combination of pall-valmundsson/puppet-createrepo and bp85/puppet-mirror_repos may solve my requirements but I wanted to get a feel for what other people are using. I need to mirror some outside repos so that I'm not using so much bandwidth at patching time and I need to host some custom RPMs.
  • s

    Slackbot

    08/05/2022, 3:13 PM
    This message was deleted.
    y
    b
    • 3
    • 5
  • s

    Slackbot

    08/05/2022, 3:19 PM
    This message was deleted.
    y
    b
    • 3
    • 3
  • b

    Brian Schonecker

    08/05/2022, 3:52 PM
    Looks like voxpupuli puppet-yum does not support creating a yum repo; it only manages repo files and yum-config stuff.
1...123124125...428Latest