Project

General

Profile

Actions

Feature #6618

closed

Provide a helper to indent in templates

Added by Stephen Benjamin almost 10 years ago. Updated almost 6 years ago.

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

Description

When creating a cloud-init user data script, one may want to use the write-files directive to write out Foreman snippets, which would need to be indented. I'd like to add a helper called indent so I can do something like this:

#cloud-config
some_directive: true
foo: bar
write_files:
- path: /root/freeipa.sh
  permissions: '0755'
  content: |
<%  
  indent 4 do
    snippet "freeipa-register" 
  end
%>
Actions

Also available in: Atom PDF