Feature #3955
closed
Define param_defined? and param_true? methods for Host
Added by Lukas Zapletal almost 11 years ago.
Updated over 6 years ago.
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.
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.
- Status changed from Assigned to Ready For Testing
- Target version set to 1.9.2
- Translation missing: en.field_release set to 2
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF