Merge "Make UpgradeInitCommand and UpgradeLeapp{ToRemove,ToInstall,CommandOptions} per-role" into stable/victoria

This commit is contained in:
Zuul 2021-03-17 00:36:09 +00:00 committed by Gerrit Code Review
commit e64f4f4eb6

View File

@ -114,9 +114,17 @@ resources:
map_replace: map_replace:
- map_replace: - map_replace:
- dnf_module_list: DnfStreams - dnf_module_list: DnfStreams
upgrade_leapp_command_options: UpgradeLeappCommandOptions
upgrade_leapp_to_remove: UpgradeLeappToRemove
upgrade_leapp_to_install: UpgradeLeappToInstall
upgrade_init_command: UpgradeInitCommand
- values: {get_param: [RoleParameters]} - values: {get_param: [RoleParameters]}
- values: - values:
DnfStreams: {get_param: DnfStreams} DnfStreams: {get_param: DnfStreams}
UpgradeLeappCommandOptions: {get_param: UpgradeLeappCommandOptions}
UpgradeLeappToRemove: {get_param: UpgradeLeappToRemove}
UpgradeLeappToInstall: {get_param: UpgradeLeappToInstall}
UpgradeInitCommand: {get_param: UpgradeInitCommand}
outputs: outputs:
role_data: role_data:
@ -148,7 +156,7 @@ outputs:
ansible_facts['distribution_major_version'] is version('7', '==') }} ansible_facts['distribution_major_version'] is version('7', '==') }}
upgrade_leapp_debug: {get_param: UpgradeLeappDebug} upgrade_leapp_debug: {get_param: UpgradeLeappDebug}
upgrade_leapp_devel_skip: {get_param: UpgradeLeappDevelSkip} upgrade_leapp_devel_skip: {get_param: UpgradeLeappDevelSkip}
upgrade_leapp_command_options: {get_param: UpgradeLeappCommandOptions} upgrade_leapp_command_options: {get_attr: [RoleParametersValue, value, 'upgrade_leapp_command_options']}
upgrade_leapp_reboot_timeout: {get_param: UpgradeLeappRebootTimeout} upgrade_leapp_reboot_timeout: {get_param: UpgradeLeappRebootTimeout}
upgrade_leapp_post_reboot_delay: {get_param: UpgradeLeappPostRebootDelay} upgrade_leapp_post_reboot_delay: {get_param: UpgradeLeappPostRebootDelay}
vars: vars:
@ -181,14 +189,14 @@ outputs:
state: latest state: latest
- name: "add packages into Leapp's to_remove file" - name: "add packages into Leapp's to_remove file"
vars: vars:
pkg_to_remove: { get_param: UpgradeLeappToRemove } pkg_to_remove: {get_attr: [RoleParametersValue, value, 'upgrade_leapp_to_remove']}
lineinfile: lineinfile:
path: "/etc/leapp/transaction/to_remove" path: "/etc/leapp/transaction/to_remove"
line: "{{ item }}" line: "{{ item }}"
loop: "{{ pkg_to_remove }}" loop: "{{ pkg_to_remove }}"
- name: "add packages into Leapp's to_install file" - name: "add packages into Leapp's to_install file"
vars: vars:
pkg_to_install: { get_param: UpgradeLeappToInstall } pkg_to_install: {get_attr: [RoleParametersValue, value, 'upgrade_leapp_to_install']}
lineinfile: lineinfile:
path: "/etc/leapp/transaction/to_install" path: "/etc/leapp/transaction/to_install"
line: "{{ item }}" line: "{{ item }}"
@ -246,7 +254,7 @@ outputs:
- '' - ''
- - "#!/bin/bash\n\n" - - "#!/bin/bash\n\n"
- "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n" - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
- {get_param: UpgradeInitCommand} - {get_attr: [RoleParametersValue, value, 'upgrade_init_command']}
- name: Run UpgradeInitCommonCommand - name: Run UpgradeInitCommonCommand
shell: shell:
list_join: list_join: