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

    Jason Grammenos

    09/07/2022, 3:04 PM
    which puppet then cannot interpret correctly
  • j

    Jason Grammenos

    09/07/2022, 3:20 PM
    is there any way to get puppet to correctly parse the array of strings? or not have hiera stringify the values?
  • v

    vchepkov

    09/07/2022, 3:25 PM
    I personally don't see an appeal to have this data in hiera, this is code, it should be in manifest, imho
  • j

    Jason Grammenos

    09/07/2022, 3:27 PM
    the thing I am trying to do, is that the list of required classes will be changing based on which node the exec is accompaning. As in for node A the list of classses might be 'mm::common', but for node B it could be 'mm::common, mm::api'
  • j

    Jason Grammenos

    09/07/2022, 3:27 PM
    the thing I am trying to do, is that the list of required classes will be changing based on which node the exec is accompaning. As in for node A the list of classses might be 'mm::common', but for node B it could be 'mm::common, mm::api'
  • j

    Jason Grammenos

    09/07/2022, 3:28 PM
    so i could pass the data from elsewhere (from the node) instead of hiera, but the goal is to not have a static list.
  • s

    Slackbot

    09/07/2022, 3:29 PM
    This message was deleted.
    h
    • 2
    • 1
  • t

    tvaughan

    09/07/2022, 3:30 PM
    @Jason Grammenos https://puppet.com/docs/puppet/7/lang_data_resource_reference.html#multi-resource-references Try this
  • t

    tvaughan

    09/07/2022, 3:31 PM
    Should just be able to plop an array of names into
    Class[$array_of_names]
  • j

    Jason Grammenos

    09/07/2022, 3:31 PM
    ok, thanks @tvaughan worth a try
  • b

    bastelfreak

    09/07/2022, 3:33 PM
    Copy code
    mm::drs::trigger_jenkins::trigger_jenkins_require:
     - ...
    lookup_options:
      mm::drs::trigger_jenkins::trigger_jenkins_require:
        convert_to: Resource
  • j

    Jason Grammenos

    09/07/2022, 3:33 PM
    ahh, that looks intersting
  • b

    bastelfreak

    09/07/2022, 3:33 PM
    for resource references in hiera, you need to convert them. I'm not sure if
    Resource
    is the correct datatype here, but I think so
  • j

    Jason Grammenos

    09/07/2022, 3:34 PM
    @bastelfreak thanks, going to try that as well
  • b

    bastelfreak

    09/07/2022, 3:35 PM
    helpful pages: https://puppet.com/docs/puppet/6/lang_data_type.html and https://puppet.com/docs/puppet/6/securing-sensitive-data.html
  • j

    Jason Grammenos

    09/07/2022, 3:36 PM
    so 'Resource' doesnt appear to work:
    Copy code
    Creation of new instance of type 'Resource' is not supported
  • b

    bastelfreak

    09/07/2022, 3:38 PM
    maybe
    Type[Resource]
  • h

    helindbe

    09/07/2022, 3:40 PM
    The Resource datatype does not implement “new”. Can log a ticket for it.
  • s

    Slackbot

    09/07/2022, 3:41 PM
    This message was deleted.
    h
    j
    • 3
    • 4
  • h

    helindbe

    09/07/2022, 3:41 PM
    Type[Resource] would make sense if instances of the datatype were actually resource lnstances, but they are not - they are just references to them.
  • h

    helindbe

    09/07/2022, 3:56 PM
    Also IIRC, you can just pass that directly into the require as it should support an array of names to require.
  • j

    jhoblitt

    09/07/2022, 5:49 PM
    I am assigning a hash to a hiera key. I would like one of the keys inside of that hash to be a
    Sensitive[String]
    . Is there any way to coerce the type? `lookup_options`/`convert_to` does not appear to match keys in data (not surprising).
  • j

    jhoblitt

    09/07/2022, 5:54 PM
    Trying to convert the key to Sensitive results in
    expects a value of type Undef or Sensitive[Hash], got Struct
  • j

    jhoblitt

    09/07/2022, 5:55 PM
    Trying to convert the key to Sensitive results in
    expects a value of type Undef or Sensitive[Hash], got Struct
  • s

    Slackbot

    09/07/2022, 6:17 PM
    This message was deleted.
    j
    • 2
    • 1
  • s

    Slackbot

    09/07/2022, 6:19 PM
    This message was deleted.
    j
    h
    g
    • 4
    • 16
  • j

    jhoblitt

    09/07/2022, 6:48 PM
    Is it possible to escape inside a function call?
    %
    didn't work and
    \
    causes an error
    found unknown escape character .(46) while scanning a double-quoted scalar at line
  • a

    April Murphy

    09/07/2022, 6:58 PM
    @April Murphy has left the channel
  • a

    Andries Malan

    09/07/2022, 7:35 PM
    https://github.com/puppetlabs/puppetlabs-apache/pull/2307
  • a

    Andries Malan

    09/07/2022, 7:37 PM
    message has been deleted
1...155156157...428Latest