Skip to content

Commit

Permalink
Run openstack minor update using instal_yaml openstack_update_run target
Browse files Browse the repository at this point in the history
  • Loading branch information
ciecierski committed Jul 9, 2024
1 parent 1337702 commit 6a93a7c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 41 deletions.
3 changes: 2 additions & 1 deletion playbooks/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
ansible.builtin.include_role:
name: repo_setup

- name: Update all openstack services containers env vars in meta operator with tag from delorean
- name: Update all openstack services containers env vars in meta operator with tag from delorean and update OPENSTACK_RELEASE_VERSION
vars:
cifmw_set_openstack_containers_dlrn_md5_path: "{{ cifmw_basedir }}/artifacts/repositories/delorean.repo.md5"
cifmw_set_openstack_containers_tag_from_md5: true
cifmw_set_openstack_containers_extra_vars: "{{ cifmw_edpm_prepare_extra_vars }}"
cifmw_set_openstack_containers_openstack_version_change: true
ansible.builtin.include_role:
name: set_openstack_containers

Expand Down
1 change: 1 addition & 0 deletions roles/repo_setup/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
when:
- content_provider_dlrn_md5_hash is defined
- content_provider_dlrn_md5_hash | length > 0
- (not cifmw_run_update|default(false)) or (update_playbook_run is defined and cifmw_run_update|default(false))

- name: Run repo-setup
become: "{{ not cifmw_repo_setup_output.startswith(ansible_user_dir) }}"
Expand Down
4 changes: 3 additions & 1 deletion roles/update/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ Role to run update

## Parameters
* ``cifmw_update_extras`: (hash) Hold job variable that get set when running the update playbook.
* ``cifmw_update_openstack_update_run_operators_updated`: (Bool) Set if openstack_update_run make target should not modify openstack-operator csv to fake openstack services container change. Default to true.
* ``cifmw_update_openstack_update_run_target_version`: (String) Define openstack target version to run update to.

## Examples
## Example
5 changes: 5 additions & 0 deletions roles/update/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@

# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "cifmw_update"

cifmw_update_openstack_update_run_target_version: "0.0.2"
cifmw_update_openstack_update_run_operators_updated: true
cifmw_update_openstack_update_run_containers_namespace: "podified-antelope-centos9"
cifmw_update_openstack_update_run_containers_target_tag: "current-podified"
25 changes: 20 additions & 5 deletions roles/update/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,24 @@
# License for the specific language governing permissions and limitations
# under the License.

- name: Hello World
ansible.builtin.debug:
msg: "Hello World from update"
- name: Set openstack_update_run Makefile environment variables
tags:
- always
ansible.builtin.set_fact:
_make_openstack_update_run_params: |
{% if not cifmw_update_openstack_update_run_operators_updated -%}
FAKE_UPDATE: true
CONTAINERS_NAMESPACE: {{ cifmw_update_openstack_update_run_containers_namespace }}
CONTAINERS_TARGET_TAG: {{ cifmw_update_openstack_update_run_containers_target_tag }}
OPENSTACK_VERSION: {{ cifmw_update_openstack_update_run_target_version }}
{% else -%}
OPENSTACK_VERSION: {{ cifmw_update_openstack_update_run_target_version }}
{% endif -%}
- name: Run update-csv tasks
ansible.builtin.include_tasks: update-csv.yml
- name: Run make openstack_update_run
vars:
make_openstack_update_run_env: "{{ cifmw_install_yamls_environment | combine({'PATH': cifmw_path }) }}"
make_openstack_update_run_params: "{{ _make_openstack_update_run_params | from_yaml }}"
ansible.builtin.include_role:
name: 'install_yamls_makes'
tasks_from: 'make_openstack_update_run'
34 changes: 0 additions & 34 deletions roles/update/tasks/update-csv.yml

This file was deleted.

0 comments on commit 6a93a7c

Please sign in to comment.