Revision 8c6be4f1
Added by Leos Stejskal about 1 month ago
app/views/foreman_ansible/job_templates/convert_to_rhel.erb | ||
---|---|---|
options: "yes\r\nno"
|
||
advanced: false
|
||
value_type: plain
|
||
resource_type: Katello::ActivationKey
|
||
hidden_value: false
|
||
model: JobTemplate
|
||
job_category: Convert 2 RHEL
|
||
... | ... | |
ansible.builtin.package:
|
||
name: convert2rhel
|
||
state: present
|
||
|
||
- name: Gather package facts
|
||
package_facts:
|
||
manager: auto
|
||
|
||
- name: Set fact for package version
|
||
set_fact:
|
||
convert2rhel_version: "{{ ansible_facts.packages['convert2rhel'][0].version }}"
|
||
when: "'convert2rhel' in ansible_facts.packages"
|
||
no_log: true
|
||
|
||
- name: Prepopulate katello-ca-consumer
|
||
get_url:
|
||
url: <%= subscription_manager_configuration_url(@host) %>
|
||
dest: /usr/share/convert2rhel/subscription-manager/katello-ca-consumer-latest.noarch.rpm
|
||
when:
|
||
- "convert2rhel_version is version('2.0.0', '<')"
|
||
|
||
- name: Start convert2rhel
|
||
command: convert2rhel -y --activationkey "<%= input_resource('Activation Key').name %>" --org "<%= @host.organization.label %>" --keep-rhsm
|
||
command: convert2rhel -y --activationkey "<%= input_resource('Activation Key').name %>" --org "<%= @host.organization.label %>"
|
||
|
||
<%- if input('Restart') == "yes" -%>
|
||
- name: Reboot the machine
|
||
reboot:
|
Also available in: Unified diff
Fixes SAT-24133 Convert2RHEL: deprecated functionality
- RPM is not installed for version 2.0.0
- Removed keep-rhsm flag