-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/devel' into devel
- Loading branch information
Showing
30 changed files
with
1,790 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Omnia version devel | ||
omnia_version: 1.3 | ||
omnia_installation_path: "" |
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
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
71 changes: 71 additions & 0 deletions
71
control_plane/roles/control_plane_common/tasks/omnia_version_configuration.yml
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,71 @@ | ||
# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--- | ||
|
||
- name: Create default directory to store omnia files | ||
file: | ||
path: "{{ omnia_default_path }}" | ||
state: directory | ||
mode: "{{ mount_dir_perm }}" | ||
|
||
- name: Check omnia_version is already present | ||
stat: | ||
path: "{{ dest_omnia_version }}" | ||
register: omnia_version_stat | ||
|
||
- block: | ||
- name: Include {{ dest_omnia_version }} as variable | ||
include_vars: "{{ dest_omnia_version }}" | ||
|
||
- name: Check omnia_version in repository | ||
command: grep "omnia_version:" "{{ src_omnia_version }}" | ||
changed_when: false | ||
register: omnia_version_check | ||
|
||
- name: Set new_omnia_version | ||
set_fact: | ||
new_omnia_version: "{{ omnia_version_check.stdout | regex_replace('omnia_version: ','') }}" | ||
|
||
- name: Do you want to proceed with upgrade | ||
pause: | ||
prompt: "{{ enable_upgrade_prompt_msg }}" | ||
register: enable_upgrade_input | ||
when: new_omnia_version | float > omnia_version | float | ||
|
||
- name: Abort control_plane.yml execution | ||
fail: | ||
msg: "{{ enable_upgrade_fail_msg }}" | ||
when: | ||
- enable_upgrade_input.user_input is defined | ||
- enable_upgrade_input.user_input | lower != "yes" | ||
|
||
- name: Enabling control plane upgrade | ||
fail: | ||
msg: "{{ enable_upgrade_warn_msg }}" | ||
when: | ||
- enable_upgrade_input.user_input is defined | ||
- enable_upgrade_input.user_input | lower == "yes" | ||
when: omnia_version_stat.stat.exists | ||
|
||
- name: Set omnia_installation_path in omnia_version | ||
replace: | ||
path: "{{ src_omnia_version }}" | ||
regexp: "^(.*)omnia_installation_path(.*)" | ||
replace: "omnia_installation_path: {{ playbook_dir.split('control_plane')[0] }}" | ||
|
||
- name: Copy omnia_version | ||
copy: | ||
src: "{{ src_omnia_version }}" | ||
dest: "{{ dest_omnia_version }}" | ||
mode: "{{ mount_dir_perm }}" |
Oops, something went wrong.