Project

General

Profile

Actions

Feature #1029

closed

Allow custom variables to be queried from a puppet function

Added by Marcello de Sousa almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
External Nodes
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The new custom variables and multiple values resolved should be available via a puppet function (similar to extlookup).

Example usage in puppet code (with function name -> "foremanextvar"):

foremanextvar (<variable>, <default_value>, <comment>, <paramfile_with_extra_options> )

This way we could achieve the following:
- manage the variables in foreman
- query them from puppetcode
- Add metadata (for ex. "comment")
- have forward and backwards compatibility with core puppet functions (using the "default_value" field).
Example (with extlookup fallback compatibility and comment):

$ntpd_options   =  foremanextvar (ntpd_options, extlookup (ntpd_options), "oracle needs -o in RAC environments" )

Note: This implementation would also require a way to enable/disable the params from adding to the enc yaml (something to avoid puppet errors complaining the variable is already defined.)

Actions #1

Updated by Ohad Levy almost 13 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF