Sha256: f4d39792648f0a2a04cd7a24c806d22f88cec1b9c76091cbbac6dd0e56e84f39

Contents?: true

Size: 1.21 KB

Versions: 5

Compression:

Stored size: 1.21 KB

Contents

<%#
kind: job_template
name: Install errata by search query - Katello Script Default
job_category: Katello
description_format: 'Install errata %{Errata search query}'
feature: katello_errata_install_by_search
provider_type: script
template_inputs:
- name: Errata search query
  description: Filter criteria for errata to be installed.
  input_type: user
  required: false
foreign_input_sets:
- template: Package Action - Script Default
  exclude: action,package
%>

<% advisory_ids = @host.advisory_ids(search: input("Errata search query")) -%>
<% render_error(N_("No errata matching given search query")) if !input("Errata search query").blank? && advisory_ids.blank? -%>
# RESOLVED_ERRATA_IDS=<%= advisory_ids.join(',') %>

<%= snippet_if_exists(template_name + " custom pre") %>
<% if @host.operatingsystem.family == 'Suse' -%>
    <%= render_template('Package Action - Script Default', :action => 'install -n -t patch', :package => advisory_ids.join(' ')) %>
<% else -%>
    <% advisories = advisory_ids.map { |e| "--advisory=#{e}" }.join(' ') -%>
    <%= render_template('Package Action - Script Default', :action => 'update-minimal', :package => advisories) %>
<% end -%>
<%= snippet_if_exists(template_name + " custom post") %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
katello-4.14.0 app/views/foreman/job_templates/install_errata_by_search_query.erb
katello-4.14.0.rc3 app/views/foreman/job_templates/install_errata_by_search_query.erb
katello-4.14.0.rc2 app/views/foreman/job_templates/install_errata_by_search_query.erb
katello-4.14.0.rc1.1 app/views/foreman/job_templates/install_errata_by_search_query.erb
katello-4.14.0.rc1 app/views/foreman/job_templates/install_errata_by_search_query.erb