-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sles to sap migration to distupgrade state
- Loading branch information
Showing
3 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
susemanager-utils/susemanager-sls/salt/distupgrade/sap.sls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{% set sles_release_installed = (salt['pkg.info_installed']('sles-release', attr='version', failhard=False).get('sles-release', {}).get('version') != None) %} | ||
{% if sles_release_installed and pillar.get('susemanager:distupgrade:targetbaseproduct:name', '')|lower == 'sles_sap' %} | ||
|
||
mgr_remove_release_package: | ||
cmd.run: | ||
- name: "rpm -e --nodeps sles-release" | ||
|
||
mgr_remove_flavor_package_dvd: | ||
cmd.run: | ||
- name: "rpm -e --nodeps sles-release-DVD" | ||
- onlyif: rpm -q sles-release-DVD | ||
|
||
mgr_remove_flavor_package_pool: | ||
cmd.run: | ||
- name: "rpm -e --nodeps sles-release-POOL" | ||
- onlyif: rpm -q sles-release-POOL | ||
|
||
{% set default_modules = ['SLES_SAP', 'sle-module-basesystem', 'sle-module-desktop-applications', 'sle-module-server-applications', 'sle-ha', 'sle-module-sap-applications'] %} | ||
|
||
{% for module in default_modules %} | ||
mgr_install_product_{{ module }}: | ||
cmd.run: | ||
- name: zypper --no-refresh --non-interactive install --no-recommends --auto-agree-with-product-licenses -t product {{ module }} | ||
- require: | ||
- cmd: mgr_remove_release_package | ||
- cmd: mgr_remove_flavor_package_dvd | ||
- cmd: mgr_remove_flavor_package_pool | ||
{% endfor %} | ||
|
||
spmigration: | ||
test.nop: | ||
- require: | ||
{%- for module in default_modules %} | ||
- mgr_install_product_{{ module }} | ||
{%- endfor %} | ||
{% endif %} |