Sha256: 6179b7150936c9c7d050d87ad925c98627a98579edbc61865ebc5e6c08a23d55

Contents?: true

Size: 1.01 KB

Versions: 8

Compression:

Stored size: 1.01 KB

Contents

<%#
name: Convert2RHEL analyze
snippet: false
template_inputs:
  - name: Data telemetry
    required: false
    input_type: user
    options: "yes\r\nno"
    advanced: false
    value_type: plain
    default: 'yes'
    hidden_value: false
model: JobTemplate
job_category: Convert 2 RHEL
provider_type: script
kind: job_template
%>
<% if @host.operatingsystem.family == 'Redhat' -%>
if ! [ $(id -u) -eq 0 ]; then
  echo "You must run convert2rhel as a root user."
  exit 1
fi

if ! rpm -q convert2rhel &> /dev/null; then
  yum install -y convert2rhel
fi

<% if input('Data telemetry') != "yes" -%>
export CONVERT2RHEL_DISABLE_TELEMETRY=1
<% end -%>

/usr/bin/convert2rhel analyze -y

# Workaround for https://issues.redhat.com/browse/RHELC-1280
subscription-manager facts --update

if grep -q ERROR /var/log/convert2rhel/convert2rhel-pre-conversion.json; then
    echo "Error: Some error(s) have been found."
    echo "Exiting ..."
    exit 1
fi

<% else %>
echo 'Unsupported OS, it must be from the Red Hat family.'
exit 1
<% end -%>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foreman_remote_execution-10.1.3 app/views/templates/script/convert2rhel_analyze.erb
foreman_remote_execution-13.0.0 app/views/templates/script/convert2rhel_analyze.erb
foreman_remote_execution-12.0.5 app/views/templates/script/convert2rhel_analyze.erb
foreman_remote_execution-12.0.4 app/views/templates/script/convert2rhel_analyze.erb
foreman_remote_execution-12.0.1 app/views/templates/script/convert2rhel_analyze.erb
foreman_remote_execution-12.0.2 app/views/templates/script/convert2rhel_analyze.erb
foreman_remote_execution-11.1.3 app/views/templates/script/convert2rhel_analyze.erb
foreman_remote_execution-10.1.2 app/views/templates/script/convert2rhel_analyze.erb