In mixed version upgrade we don't want yum upgrade to be triggered.
We re-use the repo-setup role during the upgrade to create the script we push in the UpgradeInitCommand[1] command. We don't want "yum upgrade -y" to be triggered at that moment. repo_setup_run_update variable enable us to do that. We cannot override the repo_cmd_after because it's an extra variable (passed using "-e") and it has the highest precedence possible in ansible[2]. [1] currently there https://review.openstack.org/#/c/541621/1/playbooks/multinode-overcloud-upgrade.yml [2] https://docs.ansible.com/ansible/latest/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable Change-Id: I4b2f2696d366db766a5ab146cc718ccc4a15c629
This commit is contained in:
parent
221b8f8cd9
commit
1cbea790e2
|
@ -127,4 +127,11 @@ repo_cmd_after: |
|
|||
sudo rm -rf /etc/yum.repos.d/*.rpmsave;
|
||||
sudo yum repolist;
|
||||
sudo yum clean metadata
|
||||
{% if repo_setup_run_update|default(true)|bool %}
|
||||
sudo yum update -y
|
||||
{% endif %}
|
||||
|
||||
undercloud_rpm_dependencies: >-
|
||||
python-tripleoclient
|
||||
ceph-ansible
|
||||
|
||||
|
|
|
@ -125,4 +125,11 @@ repo_cmd_after: |
|
|||
sudo rm -rf /etc/yum.repos.d/*.rpmsave;
|
||||
sudo yum repolist;
|
||||
sudo yum clean metadata
|
||||
{% if repo_setup_run_update|default(true)|bool %}
|
||||
sudo yum update -y
|
||||
{% endif %}
|
||||
|
||||
undercloud_rpm_dependencies: >-
|
||||
python-tripleoclient
|
||||
ceph-ansible
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ Role Variables
|
|||
* `add_repos` - dictionary of additional repositories to add, could be populated in code, by
|
||||
default is empty. Note that this dictionary will be constructed in the same manner
|
||||
as a typical `repos` dictionary. See examples below.
|
||||
* `repo_setup_run_update` - false/true - whether to run or not yum update after setting up the repo.
|
||||
Default to true.
|
||||
|
||||
|
||||
*File*
|
||||
------
|
||||
|
|
|
@ -30,6 +30,8 @@ repos:
|
|||
filename: delorean-deps.repo
|
||||
down_url: https://trunk.rdoproject.org/centos7-{{ release }}/delorean-deps.repo
|
||||
|
||||
repo_setup_run_update: true
|
||||
|
||||
# For adding custom repositories in featureset files
|
||||
add_repos: []
|
||||
# rhsm variables
|
||||
|
|
Loading…
Reference in New Issue