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

    VoxBot

    06/22/2023, 7:45 AM
    and is Serverspec:Type:Host really correct
  • v

    VoxBot

    06/22/2023, 7:52 AM
    moved it to spec/spec_helper_acceptance.rb and it passes now
  • m

    Markus Zilch

    06/22/2023, 10:07 AM
    can i get a review for https://github.com/voxpupuli/puppet-openssl/pull/166 please?
  • i

    Ian CB

    06/22/2023, 12:26 PM
    Hi - I have a requirement to configure firewalld to allow access for specific hosts to ssh, block all other access via ssh, and allow all other access to the host on whatever port. Digging around on the internet I found a set of rich rules which appear to do what I want; firewall-cmd --zone=public --add-rich-rule ‘rule source address=<IP> port port=“22” protocol=“tcp” accept’ firewall-cmd --zone=public --add-rich-rule ‘rule priority=“30000” port port=“22" protocol=“tcp” reject’ firewall-cmd --zone=public --add-rich-rule ‘rule priority=“32767" protocol=“tcp” accept’ firewall-cmd --zone=public --add-rich-rule ‘rule priority=“32767" protocol=“udp” accept’ the firewalld module in the forge is great - however the rich rule module does not seem to have a priority option. I was going to code some exec statements for the items requiring priority but I suspect that this will not work as the rules will not be in the puppet catalog and as a result the command which init’s firewalld with its purge rich rules will simply remove the rules applied via exec (and we end up with the rules being removed / applied in a vicious cycle). Any suggestions ???
  • b

    bastelfreak

    06/22/2023, 12:32 PM
    first idea: Don't use the legact firewalld but switch to nftables
    👍 1
  • b

    bastelfreak

    06/22/2023, 12:32 PM
    second: you can probably order rules by their name (I assume they are ordered alphabetically, but I'm not 100% sure)
  • i

    Ian CB

    06/22/2023, 12:57 PM
    Thanks …. I was hoping to be able to use the same code on CentOS 7 (which I dont think supports nftables). I think priorities were added to firewalld in order to support ordering as I dont think the rules have names as such. I’ll see if I can figure out how to get nftables working
  • b

    bastelfreak

    06/22/2023, 1:55 PM
    @Alex Fisher yoyo. didn't you once hack a systemd dropin that adds an execstartpost so the unit waits until the service is actually up?
  • v

    VoxBot

    06/22/2023, 1:58 PM
    Probably better to have a separate unit to wait for a service in that case - like the wait-online "service" that exists
  • v

    VoxBot

    06/22/2023, 1:59 PM
    that would work as well, yes
  • v

    VoxBot

    06/22/2023, 2:01 PM
    mhm maybe that wasn't afisher but ewoud
  • y

    Yury Bushmelev

    06/22/2023, 2:06 PM
    should be simple enough wrapper around
    wait_for
    or
    nc
    maybe.. depends on a service though
  • v

    VoxBot

    06/22/2023, 2:06 PM
    yeah it was something like that
  • y

    Yury Bushmelev

    06/22/2023, 2:07 PM
    were you asking about an example? 🙂
  • v

    VoxBot

    06/22/2023, 2:08 PM
    yeah. I was looking for one that was posted here in the past
  • v

    VoxBot

    06/22/2023, 2:08 PM
    I think that was just an infinite loop around nc to check when a tcp port is open
  • y

    Yury Bushmelev

    06/22/2023, 2:15 PM
    /bin/bash -c 'while ! nc -z 127.0.0.1 12345; do sleep 1; done'
  • y

    Yury Bushmelev

    06/22/2023, 2:15 PM
    something like this I guess
  • y

    Yury Bushmelev

    06/22/2023, 2:16 PM
    !
    might need to be escaped properly
  • y

    Yury Bushmelev

    06/22/2023, 2:16 PM
    ah.. nc will block.. so should be
    nc -z
  • y

    Yury Bushmelev

    06/22/2023, 2:18 PM
    Luckily there is no systemd on FreeBSD so nobody would blame me for
    /bin/bash
    😄
  • v

    vchepkov

    06/22/2023, 3:14 PM
    latest versions removed
    -z
    from nc sadluke
  • y

    Yury Bushmelev

    06/22/2023, 3:24 PM
    hmm.. how come? that was the main purpose of
    nc
    !
  • b

    bastelfreak

    06/22/2023, 3:28 PM
    dont mix the openbsd and the gnu nc
  • j

    jhoblitt

    06/22/2023, 5:24 PM
    uhh... with msync... I'm putting a new file under moduleroot and
    bundle exec msync update --offline
    isn't copying it... what am I missing? I swear this has worked before.
  • b

    bastelfreak

    06/22/2023, 5:24 PM
    does it end with .erb
  • j

    jhoblitt

    06/22/2023, 5:24 PM
    facepalm
  • j

    jhoblitt

    06/22/2023, 5:24 PM
    @bastelfreak I'm not worthy...
  • b

    bastelfreak

    06/22/2023, 5:25 PM
    🙂
  • j

    jhoblitt

    06/22/2023, 5:40 PM
    I am having a bad day. Now I'm seeing acceptance test failures only for centos 7 and only in some of my modules:
    Copy code
    Failed to set locale, defaulting to C
      Loaded plugins: fastestmirror, ovl
      Examining /var/tmp/yum-root-8G7ppP/puppet7-release-el-7.noarch.rpm: puppet7-release-7.0.0-14.el7.noarch
      /var/tmp/yum-root-8G7ppP/puppet7-release-el-7.noarch.rpm: does not update installed package.
      Error: Nothing to do
1...520521522...647Latest