Project

General

Profile

Actions

Feature #3955

closed

Define param_defined? and param_true? methods for Host

Added by Lukas Zapletal over 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Templates
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

We often do this in our templates:

@host.params['enable-puppetlabs-repo'] && @host.params['enable-puppetlabs-repo'] == 'true'

this could be written as

@host.param_true?('enable-puppetlabs-repo')

I am going to do this small patch and after this is merged, let's raise a ticked for community templates to use this after 1.4 release.

Actions

Also available in: Atom PDF