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

    Massimiliano (Max)

    09/13/2022, 1:49 PM
    it's a bug in the firewall module: https://github.com/puppetlabs/puppetlabs-firewall/issues/1071
  • s

    Slackbot

    09/13/2022, 1:49 PM
    This message was deleted.
    j
    c
    +3
    • 6
    • 13
  • m

    Massimiliano (Max)

    09/13/2022, 1:49 PM
    it's a bug in the module: https://github.com/puppetlabs/puppetlabs-firewall/issues/1071
  • m

    matt

    09/13/2022, 1:58 PM
    what is the correct way to do an evaluation of two variables with one true and one false, sort of if $var1 and !$var2
  • m

    matt

    09/13/2022, 1:58 PM
    so var1 is true and var2 is false - then do this
  • t

    tvaughan

    09/13/2022, 1:58 PM
    $var1 and not $var2
  • t

    tvaughan

    09/13/2022, 1:58 PM
    I think
  • m

    matt

    09/13/2022, 1:58 PM
    I'm reading the lang_expressions guide in puppet and not shows as !
  • m

    matt

    09/13/2022, 1:59 PM
    hence !var2
  • t

    tvaughan

    09/13/2022, 1:59 PM
    Ah, yeah, I always forget
  • t

    tvaughan

    09/13/2022, 2:00 PM
    But
    if ($var1 and !$var2) { <stuff> }
    should work
  • m

    matt

    09/13/2022, 2:02 PM
    nice, thank you
  • m

    matt

    09/13/2022, 2:02 PM
    it looked right to me, but just wasn't comfortable
  • t

    tvaughan

    09/13/2022, 2:03 PM
    You can always
    puppet -e
    it
  • j

    Joel Wilson

    09/13/2022, 2:14 PM
    This is a really dumb question, but when I’m creating the specific variable type for a pass-thru parameter to be used with package, is it just String? The specials for
    latest
    ,
    present
    , and
    absent
    throw me off.
  • y

    Yorokobi

    09/13/2022, 2:16 PM
    stdlib has a type (or class) for those. IIRC, it is essentially an Enum
  • y

    Yorokobi

    09/13/2022, 2:17 PM
    stdlib has a type (or class) for those. IIRC, it is essentially an Enum
  • y

    Yorokobi

    09/13/2022, 2:21 PM
    hah, lolsob. stdblib uses a function. My memory is bad today. https://forge.puppet.com/modules/puppetlabs/stdlib/reference#ensure_packages However, you can always use
    Enum['latest', 'present', 'absent']
    if you want to constrain the available options. String probably works, too.
  • y

    Yorokobi

    09/13/2022, 2:23 PM
    hah, lolsob. stdblib uses a function. My memory is bad today. https://forge.puppet.com/modules/puppetlabs/stdlib/reference#ensure_packages However, you can always use
    Enum['latest', 'present', 'absent']
    if you want to constrain the available options. String probably works, too.
  • j

    Joel Wilson

    09/13/2022, 2:25 PM
    I guess they’re technically “bare strings” from the documentation.
  • m

    matt

    09/13/2022, 2:38 PM
    damn it, one of my vars is not a bool, can you do if ($var1 and $var != 'thing')
  • m

    matt

    09/13/2022, 2:38 PM
    so it evaluates a bool and a string
  • m

    Massimiliano (Max)

    09/13/2022, 2:40 PM
    message has been deleted
  • d

    Dr Bunsen Honeydew

    09/13/2022, 2:45 PM
    fry dancing _🦊Vox Pupuli monthly sync; see calendar event for info_ is about to start up in #CFD8Z9A4T
  • v

    vchepkov

    09/13/2022, 2:58 PM
    yes, you can
  • v

    vchepkov

    09/13/2022, 3:00 PM
    you also can use
    any2bool
    if that string resembles a boolean 🙂
    👍🏼 1
    👍 1
  • d

    Dr Bunsen Honeydew

    09/13/2022, 4:45 PM
    waiting 🧑‍🏫Puppet Core Team is about to start up in #CFD8Z9A4T
  • s

    Slackbot

    09/13/2022, 5:32 PM
    This message was deleted.
    h
    a
    l
    • 4
    • 6
  • s

    Slackbot

    09/13/2022, 6:24 PM
    This message was deleted.
    g
    h
    +2
    • 5
    • 4
  • u

    Ugo Bellavance

    09/13/2022, 9:04 PM
    I don't know any, but what I do is buy 1 or 2 cheap VPSs on https://my.frantech.ca/cart.php and play with it. They support snapshots so you can use a snapshot, make some changes, then revert if you broke something.
1...159160161...428Latest