# File lib/hammer_cli_import/templatesnippet.rb, line 36 def mk_snippet_hash(data) template = "%#{data['script_type']}" template += ' --nochroot' if data['chroot'] == 'N' template += " --interpreter #{data['interpreter']}" if data['interpreter'] template += "\n" template += data['data'] template += "\n" unless template.end_with? "\n" template += "%end\n" { :name => "#{data['kickstart_label']}-#{data['org_id']}-" \ "#{data['position']}-#{data['script_name']}-#{data['script_type']}", :template => template, # nowadays templates do not get associated with an organization # :organization_id => get_translated_id(:organizations, data['org_id'].to_i), :snippet => true, # audit_comment does not get stored anyway :audit_comment => '' } end