Project

General

Profile

Actions

Feature #3955

closed

Define param_defined? and param_true? methods for Host

Added by Lukas Zapletal about 10 years ago. Updated over 5 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 #1

Updated by Lukas Zapletal about 10 years ago

Other ideas: We could define "snippet_if_exist" method for rendering snippets and not issuing errors when snippet does not exist. And offer a way of determining current template name - "template_name".

This way we could add this bit into our community templates to all installation sections, so users can easily "override" and add own commands there:

<%= snippet_if_exist "#{template_name} Post" %>

By creating "Community Kickstart Post" user can add own commands there and another community template import will not destroy this.

Actions #2

Updated by Lukas Zapletal about 10 years ago

  • Status changed from Assigned to Ready For Testing
  • Target version set to 1.9.2
  • translation missing: en.field_release set to 2
Actions #3

Updated by Lukas Zapletal about 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF