Merge "[TRAIN ONLY] Provide way to initialize Leapp" into stable/train
This commit is contained in:
commit
72e20f3835
|
@ -84,6 +84,18 @@ parameters:
|
||||||
default: []
|
default: []
|
||||||
description: List of packages to install after Leapp upgrade.
|
description: List of packages to install after Leapp upgrade.
|
||||||
type: comma_delimited_list
|
type: comma_delimited_list
|
||||||
|
LeappRepoInitCommand:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Command or script snippet to run on all overcloud nodes to
|
||||||
|
initialize the Leapp process. E.g. a repository switch.
|
||||||
|
default: ''
|
||||||
|
LeappInitCommand:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Command or script snippet to run on all overcloud nodes to
|
||||||
|
apply any necessary workarounds to get Leapp working.
|
||||||
|
default: ''
|
||||||
UpgradeInitCommand:
|
UpgradeInitCommand:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -191,10 +203,53 @@ outputs:
|
||||||
-python2-requests
|
-python2-requests
|
||||||
-python2-six
|
-python2-six
|
||||||
-python2-urllib3
|
-python2-urllib3
|
||||||
|
- name: Run LeappRepoInitCommand
|
||||||
|
shell:
|
||||||
|
list_join:
|
||||||
|
- ''
|
||||||
|
- - "#!/bin/bash\n\n"
|
||||||
|
- {get_param: LeappRepoInitCommand}
|
||||||
- name: install leapp
|
- name: install leapp
|
||||||
package:
|
package:
|
||||||
name: leapp
|
name: leapp
|
||||||
state: latest
|
state: latest
|
||||||
|
- name: Check that the /etc/leapp/files/pes-events.json exists on UC
|
||||||
|
delegate_to: undercloud
|
||||||
|
stat:
|
||||||
|
path: '/etc/leapp/files/pes-events.json'
|
||||||
|
register: pes_present
|
||||||
|
- name: Check that the /etc/leapp/files/repomap.csv exists on UC
|
||||||
|
delegate_to: undercloud
|
||||||
|
stat:
|
||||||
|
path: '/etc/leapp/files/repomap.csv'
|
||||||
|
register: repomap_present
|
||||||
|
- name: Fetch the Leapp data from undercloud
|
||||||
|
fetch:
|
||||||
|
dest: '{{ playbook_dir }}'
|
||||||
|
src: '{{ item }}'
|
||||||
|
delegate_to: undercloud
|
||||||
|
with_items:
|
||||||
|
- /etc/leapp/files/pes-events.json
|
||||||
|
- /etc/leapp/files/repomap.csv
|
||||||
|
when:
|
||||||
|
- repomap_present.stat.exists
|
||||||
|
- pes_present.stat.exists
|
||||||
|
- name: Copy the Leapp data from undercloud
|
||||||
|
copy:
|
||||||
|
dest: '{{ item }}'
|
||||||
|
src: '{{ playbook_dir }}/{{ inventory_hostname }}/{{ item }}'
|
||||||
|
with_items:
|
||||||
|
- /etc/leapp/files/pes-events.json
|
||||||
|
- /etc/leapp/files/repomap.csv
|
||||||
|
when:
|
||||||
|
- repomap_present.stat.exists
|
||||||
|
- pes_present.stat.exists
|
||||||
|
- name: Run LeappInitCommand
|
||||||
|
shell:
|
||||||
|
list_join:
|
||||||
|
- ''
|
||||||
|
- - "#!/bin/bash\n\n"
|
||||||
|
- {get_param: LeappInitCommand}
|
||||||
- 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_param: UpgradeLeappToRemove }
|
||||||
|
@ -260,7 +315,6 @@ outputs:
|
||||||
list_join:
|
list_join:
|
||||||
- ''
|
- ''
|
||||||
- - "#!/bin/bash\n\n"
|
- - "#!/bin/bash\n\n"
|
||||||
- "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
|
|
||||||
- {get_param: UpgradeInitCommand}
|
- {get_param: UpgradeInitCommand}
|
||||||
- name: Run UpgradeInitCommonCommand
|
- name: Run UpgradeInitCommonCommand
|
||||||
shell:
|
shell:
|
||||||
|
|
|
@ -8,6 +8,7 @@ resource_registry:
|
||||||
OS::TripleO::Services::MongoDb: OS::Heat::None
|
OS::TripleO::Services::MongoDb: OS::Heat::None
|
||||||
|
|
||||||
parameter_defaults:
|
parameter_defaults:
|
||||||
|
UpgradeLeappCommandOptions: " --enablerepo rhel-8-for-x86_64-baseos-eus-rpms --enablerepo rhel-8-for-x86_64-appstream-eus-rpms --enablerepo rhel-8-for-x86_64-highavailability-eus-rpms --enablerepo advanced-virt-for-rhel-8-x86_64-rpms --enablerepo ansible-2.9-for-rhel-8-x86_64-rpms --enablerepo fast-datapath-for-rhel-8-x86_64-rpms "
|
||||||
EnablePackageInstall: true
|
EnablePackageInstall: true
|
||||||
UpgradeLevelNovaCompute: ''
|
UpgradeLevelNovaCompute: ''
|
||||||
UpgradeInitCommonCommand: |
|
UpgradeInitCommonCommand: |
|
||||||
|
|
Loading…
Reference in New Issue