Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1135973 - [RFE] Provide a helper to indent in templates
Summary: [RFE] Provide a helper to indent in templates
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1119657
TreeView+ depends on / blocked
 
Reported: 2014-09-01 11:29 UTC by Stephen Benjamin
Modified: 2019-09-26 18:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Foreman snippets require indention to render user data templates correctly. An indent helper has been added for use to indent Foreman snippets correctly when processing cloud-init user data scripts.
Clone Of:
Environment:
Last Closed: 2014-11-13 22:29:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6618 0 None None None 2016-04-22 16:54:53 UTC
Red Hat Product Errata RHBA-2014:1857 0 normal SHIPPED_LIVE Red Hat Satellite 6 server bug fix update 2014-11-14 03:28:23 UTC

Description Stephen Benjamin 2014-09-01 11:29:08 UTC
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:

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

Comment 1 Stephen Benjamin 2014-09-01 11:29:11 UTC
Created from redmine issue http://projects.theforeman.org/issues/6618

Comment 4 Stephen Benjamin 2014-09-01 11:41:03 UTC
Upstream commit

foreman|b6983d00c3ef589c4a1099dbeed29301321bbcd6

Comment 11 Tazim Kolhar 2014-10-31 06:31:17 UTC
*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***

Able to indent template with helper

Comment 12 Tazim Kolhar 2014-10-31 11:03:32 UTC
Details of rpms:

# rpm -qa | grep foreman
foreman-1.6.0.47-1.el7sat.noarch
foreman-compute-1.6.0.47-1.el7sat.noarch
ruby193-rubygem-foreman_hooks-0.3.5-2.el7sat.noarch
foreman-gce-1.6.0.47-1.el7sat.noarch
ruby193-rubygem-foreman_discovery-1.3.0-2.el7sat.noarch
foreman-libvirt-1.6.0.47-1.el7sat.noarch
foreman-proxy-1.6.0.30-1.el7sat.noarch
ruby193-rubygem-foreman-redhat_access-0.0.4-2.el7sat.noarch
foreman-vmware-1.6.0.47-1.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-3.el7sat.noarch
foreman-selinux-1.6.0.15-1.el7sat.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.1.el7sat.noarch
foreman-ovirt-1.6.0.47-1.el7sat.noarch
foreman-postgresql-1.6.0.47-1.el7sat.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-proxy-1.0-1.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-client-1.0-1.noarch
rubygem-hammer_cli_foreman-0.1.1-16.el7sat.noarch
ruby193-rubygem-foreman_bootdisk-2.0.6-1.1.el7sat.noarch

Comment 13 Tazim Kolhar 2014-10-31 13:18:38 UTC
VERIFIED

against z-stream

please ignore https://bugzilla.redhat.com/show_bug.cgi?id=1135973#c11

Comment 15 errata-xmlrpc 2014-11-13 22:29:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2014:1857


Note You need to log in before you can comment on or make changes to this bug.