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

    Yury Bushmelev

    12/14/2022, 1:16 PM
    unrelated Q.. can IRC users see the threads? or better to avoid them?
  • v

    VoxBot

    12/14/2022, 1:17 PM
    I don't see threads
  • y

    Yury Bushmelev

    12/14/2022, 1:17 PM
    ok, I’ll follow the old&good IRC times then :)
  • y

    Yury Bushmelev

    12/14/2022, 1:30 PM
    Beaker Q2: When 1) using the
    docker
    HV and 2) want to test a systemd service do I need a systemd-enabled container? If so I guess the only way to deal with it is
    use_image_entry_point
    , right?
  • v

    VoxBot

    12/14/2022, 1:30 PM
    we've modified the generated nodesets in beaker-hostgenerator to do that for you - at least in most cases
  • v

    VoxBot

    12/14/2022, 1:31 PM
    I'd recommend to run (bundle exec) beaker-hostgenerator ubuntu2004-64 to see what's actually used
  • v

    VoxBot

    12/14/2022, 1:31 PM
    or whatever you specify in BEAKER_setfile=...
  • y

    Yury Bushmelev

    12/14/2022, 1:36 PM
    Ok, let me try! Thank you!
  • v

    VoxBot

    12/14/2022, 1:37 PM
    under the hood the logic is pretty much: File.exist?(setfile) ? File.read(setfile) :
    beaker-hostgenerator '#{setfile}'
  • v

    VoxBot

    12/14/2022, 1:43 PM
    in case someone wants to review some ruby: https://github.com/voxpupuli/puppet_metadata/pull/59 + https://github.com/voxpupuli/puppet_metadata/pull/65 + https://github.com/voxpupuli/puppet_metadata/pull/66
  • a

    Alex Fisher

    12/14/2022, 1:53 PM
    am I getting old, and/or is this block of code a bit hard to read? https://github.com/voxpupuli/puppet-zabbix/pull/856/files#diff-0bccedb9fca029e2ec3086675b8488e69b9d97f94826dfa2a34abfd435bf4445R405-R412
  • v

    VoxBot

    12/14/2022, 1:54 PM
    kind of, but why care about Apache 2.2 these days? ;)
  • a

    Alex Fisher

    12/14/2022, 1:55 PM
    I guess because the rest of the code does.
  • v

    VoxBot

    12/14/2022, 1:55 PM
    interesting format
  • t

    tuxmea

    12/14/2022, 1:55 PM
    Very dense code.
  • a

    Alex Fisher

    12/14/2022, 1:55 PM
    But yeah, maybe that's the best solution. A separate PR to remove support for older Apache.
    👍 1
  • a

    Alex Fisher

    12/14/2022, 2:12 PM
    For a moment, lets assume we did care about old apache... I've come up with 4 alternatives. Interested to know what people prefer in terms of style/readability. https://gist.github.com/alexjfisher/eeda5a8d54f9895f37b7b3aafea54d6e
  • a

    Alex Fisher

    12/14/2022, 2:13 PM
    (I think they all produce identical results, but haven't actually tested anything so there may be typos etc.)
  • b

    bastelfreak

    12/14/2022, 2:13 PM
    mhm
  • v

    VoxBot

    12/14/2022, 2:16 PM
    I'm leaning to original or the last, though I don't like the newline after $location_api_access = so I'd say the original is my preference
  • a

    Alex Fisher

    12/14/2022, 2:18 PM
    lol.
  • a

    Alex Fisher

    12/14/2022, 2:19 PM
    The last without the newline? (But with or without the expression indented?
  • v

    VoxBot

    12/14/2022, 2:20 PM
    yes
  • v

    VoxBot

    12/14/2022, 2:20 PM
    I struggled with that and think you can't make it pretty
  • a

    Alex Fisher

    12/14/2022, 2:20 PM
    So https://gist.github.com/alexjfisher/eeda5a8d54f9895f37b7b3aafea54d6e#file-examples-pp-L51
  • a

    Alex Fisher

    12/14/2022, 2:21 PM
    (and the only way to properly make it pretty is to nuke support for old apache)
  • v

    VoxBot

    12/14/2022, 2:21 PM
    I'm not sure, I really dislike intended code like that (hanging indents, right?) but not indenting is also ugly
  • a

    Alex Fisher

    12/14/2022, 2:22 PM
    I think because assigning the output of an
    if
    block is rarely used in Puppet, it helps highlight that's what's happening??
  • t

    tvaughan

    12/14/2022, 2:22 PM
    I think you can put it in parentheses to drop it to a new line without being too awful
  • t

    tvaughan

    12/14/2022, 2:23 PM
    Copy code
    $location_api_access = (
      if $....
1...212213214...648Latest