Sha256: d58e039c2df4f0de142d4e0095ddd558e85fee9d9fd1c1dbb21f1e776e5c4dc9

Contents?: true

Size: 1.24 KB

Versions: 5

Compression:

Stored size: 1.24 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"), check_installable_for_host: false) -%>
<% 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.2 app/views/foreman/job_templates/install_errata_by_search_query.erb
katello-4.15.0 app/views/foreman/job_templates/install_errata_by_search_query.erb
katello-4.15.0.rc2 app/views/foreman/job_templates/install_errata_by_search_query.erb
katello-4.15.0.rc1 app/views/foreman/job_templates/install_errata_by_search_query.erb
katello-4.14.1 app/views/foreman/job_templates/install_errata_by_search_query.erb