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

    Massimiliano (Max)

    10/20/2022, 7:14 PM
    for the sake of sharing, a colleague of mine created a function to manage the firewall, similarly to how you would do on Google/AWS with terraform. It relies on PuppetDB, Voxpupuli/ipset and Puppetlabs/firewall. You can choose either a "public" zone and a trust zone (this is the trust, where you specify your sources through IPSET). How do you like it? 🙂
  • m

    Massimiliano (Max)

    10/20/2022, 7:16 PM
    for the sake of sharing, a colleague of mine created few functions to manage the firewall, similarly to how you would do on Google/AWS with terraform. It relies on PuppetDB, Voxpupuli/ipset and Puppetlabs/firewall. You can choose either a "public" zone and a trust zone (this is the trust, where you specify your sources through IPSET). How do you like it? 🙂
  • m

    Massimiliano (Max)

    10/20/2022, 7:21 PM
    for the sake of sharing, a colleague of mine created a function to manage the firewall, similarly to how you would do on Google/AWS with terraform. It relies on PuppetDB, Voxpupuli/ipset and Puppetlabs/firewall. You can choose either a "public" zone and a trust zone (this is the trust, where you specify your sources through IPSET). How do you like it? 🙂
  • b

    bastelfreak

    10/20/2022, 7:35 PM
    voxpupuli/ipset ❤️
  • s

    Slackbot

    10/20/2022, 8:26 PM
    This message was deleted.
    v
    d
    • 3
    • 2
  • g

    Greg Bristol

    10/20/2022, 8:27 PM
    check out https://forge.puppet.com/modules/puppet/r10k#webhook-support
  • w

    William Myers

    10/20/2022, 8:27 PM
    Thanks! I've found a bunch of references to using gitlab to trigger r10k but had not found and recent step by step guides, just something Super old
  • b

    bastelfreak

    10/20/2022, 8:32 PM
    the successor of that webhook is https://github.com/voxpupuli/webhook-go
  • b

    bastelfreak

    10/20/2022, 8:32 PM
    the successor of that webhook is https://github.com/voxpupuli/webhook-go
  • g

    Greg Bristol

    10/20/2022, 8:36 PM
    ah yeah there's the Go one now as well
  • j

    Joel Wilson

    10/20/2022, 8:37 PM
    I’ve seen this pattern (like in the Telegraf module) where roles look like they could be fully defined in hieradata. I’m more familiar with the site-roles-profiles defined within a control repo. I have questions that maybe someone can point me to links to get answers for: • How do you test around hiera-based role definitions? • How might you bring in hiera definitions into the hierarchy if you wanted the roles and profiles to exist in their own repos?
  • j

    Joel Wilson

    10/20/2022, 8:38 PM
    I’m in the middle of taking an over-blown ENC and converting it to something a bit more sane and rather than take it to a 5+ year-old pattern, it’d be nice to be even more current.
  • j

    Joel Wilson

    10/20/2022, 8:38 PM
    Non-PE environment for me.
  • v

    vchepkov

    10/20/2022, 8:40 PM
    We migrated from site/role to corp:role:, makes it a standard module
  • d

    Dr Bunsen Honeydew

    10/20/2022, 8:45 PM
    the more you know 🧑‍🏫PE Console is about to start up in #CFD8Z9A4T
  • b

    bastelfreak

    10/20/2022, 8:50 PM
    @Joel Wilson a role in many environments I manage is a yaml file with a classes array. you can test it easily with rpsec-puppet to check if the catalog compiles and contains all related profiles in the correct order, or spin up a beaker instance and check if the role applies. this can live in a control-repo or as module-data in a module
  • j

    Joel Wilson

    10/20/2022, 8:50 PM
    I have to imagine that if I have a
    data/role
    directory in my
    roles
    module and the
    roles
    module’s
    hiera.yaml
    correctly explained how to map a
    $::role
    fact to files in that directory, I could just put in YAML like the following and it would appropriately bring in the mix of classes from the rest of the modulepath:
    Copy code
    ---
    profiles::nginx
    profiles::network_setup
    telegraf::global_tags:
      etc:
  • d

    Dr Bunsen Honeydew

    10/20/2022, 8:50 PM
    ```- took a hit! Ouch. (Karma: -78)
  • b

    bastelfreak

    10/20/2022, 8:50 PM
    yep
  • b

    bastelfreak

    10/20/2022, 8:51 PM
    Copy code
    ---
    classes:
      - profiles::nginx
      - profiles::network_setup
    telegraf::global_tags:
      etc:
  • d

    Dr Bunsen Honeydew

    10/20/2022, 8:51 PM
    ```- took a hit! Ouch. (Karma: -79)
  • j

    Joel Wilson

    10/20/2022, 8:51 PM
    How do you map an rspec file to an appropriate role in the data dir?
  • j

    Joel Wilson

    10/20/2022, 8:51 PM
    I made the doctor unhappy
  • b

    bastelfreak

    10/20/2022, 8:51 PM
    you loop over a list of roles and mock each role as fact, so hiera will use the yaml
  • j

    Joel Wilson

    10/20/2022, 8:53 PM
    Not sure I get the distinction between our two YAML examples. One of your groups is `include`s and one is class declaration style?
  • b

    bastelfreak

    10/20/2022, 8:54 PM
    classes is an array
  • b

    bastelfreak

    10/20/2022, 8:54 PM
    and in the site.pp I do a lookup on $classea, loop on the result and include everything
  • v

    vchepkov

    10/20/2022, 8:54 PM
    there is nothing special about this word, just a convention
  • b

    bastelfreak

    10/20/2022, 8:55 PM
    Copy code
    ```
    lookup('classes', Array[String[1]], 'unique', []).each |$c| {
      contain $c
    }
    ```
  • v

    vchepkov

    10/20/2022, 8:57 PM
    Seems easier
    Copy code
    contain lookup('classes', Array[String], 'unique', [])
1...207208209...428Latest