-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-3006 Move upgrade checks as playbook and add skip variable (#1041
- Loading branch information
Showing
7 changed files
with
86 additions
and
80 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
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
# This playbook is used to run preliminary upgrade checks for the hosts in the ACS deployment. | ||
- name: Run preliminary upgrade checks for all hosts | ||
hosts: all:!external | ||
gather_facts: false | ||
tasks: | ||
- name: Fetch status file with installed versions | ||
ansible.builtin.fetch: | ||
src: "{{ ansible_installation_status_file }}" | ||
fail_on_missing: false | ||
dest: /tmp/ | ||
register: ansible_components_status | ||
changed_when: false | ||
|
||
- name: Read installed versions from status file when available | ||
ansible.builtin.include_vars: | ||
file: /tmp/{{ inventory_hostname }}/{{ ansible_installation_status_file }} | ||
name: installed_components | ||
when: ansible_components_status.msg is undefined | ||
|
||
- name: Check for unsupported components upgrades | ||
any_errors_fatal: true | ||
module_defaults: | ||
ansible.builtin.fail: | ||
msg: > | ||
You're trying to upgrade in an unsupported manner! | ||
Please read our documentation for more informations on what's supported and what isn't. | ||
https://github.com/Alfresco/alfresco-ansible-deployment/blob/master/docs/components-upgrade.md | ||
block: | ||
- name: Fail on unsupported ACS upgrade | ||
ansible.builtin.fail: | ||
when: | ||
- installed_components.acs is defined | ||
- installed_components.api_explorer is defined | ||
- | | ||
acs.edition != installed_components.acs.edition or | ||
acs.version.split('.')[:3] | join('.') != installed_components.acs.version.split('.')[:3] | join('.') or | ||
acs.version is version(installed_components.acs.version, 'lt') or | ||
api_explorer.version != installed_components.api_explorer.version | ||
- name: Fail on unsupported AMPS upgrades | ||
ansible.builtin.fail: | ||
when: | | ||
installed_components is defined and | ||
installed_components.amps is defined and | ||
item in amps and | ||
amps[item].version != installed_components.amps[item].version | ||
loop: "{{ installed_components.amps | list }}" | ||
|
||
- name: Fail on unsupported Transformers upgrades | ||
ansible.builtin.fail: | ||
when: | ||
- installed_components.transform is defined | ||
- transform.version != installed_components.transform.version | ||
|
||
- name: Fail on unsupported Trouter upgrades | ||
ansible.builtin.fail: | ||
when: | ||
- installed_components.trouter is defined | ||
- trouter.version != installed_components.trouter.version | ||
|
||
- name: Fail on unsupported SFS upgrades | ||
ansible.builtin.fail: | ||
when: | ||
- installed_components.sfs is defined | ||
- sfs.version != installed_components.sfs.version | ||
|
||
- name: Fail on unsupported Search upgrades | ||
ansible.builtin.fail: | ||
when: | ||
- installed_components.search is defined | ||
- search.version != installed_components.search.version | ||
|
||
- name: Fail on unsupported Sync upgrades | ||
ansible.builtin.fail: | ||
when: | ||
- installed_components.sync is defined | ||
- sync.version != installed_components.sync.version |
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 was deleted.
Oops, something went wrong.
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