mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-06 10:50:31 -07:00
Downstream patching: add missing becomes
This commit is contained in:
parent
bf89b1895a
commit
59b69a6592
1 changed files with 23 additions and 2 deletions
|
@ -82,6 +82,7 @@
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ patch_archive }}"
|
path: "{{ patch_archive }}"
|
||||||
register: patch_archive_path
|
register: patch_archive_path
|
||||||
|
become: yes
|
||||||
|
|
||||||
## copy and unpack
|
## copy and unpack
|
||||||
- name: Copy patch archive to target nodes
|
- name: Copy patch archive to target nodes
|
||||||
|
@ -102,9 +103,13 @@
|
||||||
ansible.builtin.include_tasks: rhsso_cli.yml
|
ansible.builtin.include_tasks: rhsso_cli.yml
|
||||||
vars:
|
vars:
|
||||||
query: "patch info"
|
query: "patch info"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ keycloak_service_user }}"
|
||||||
|
|
||||||
- name: "Perform patching"
|
- name: "Perform patching"
|
||||||
when:
|
when:
|
||||||
- cli_result is defined
|
- cli_result is defined
|
||||||
- cli_result.stdout is defined
|
- cli_result.stdout is defined
|
||||||
- patch_version not in cli_result.stdout
|
- patch_version not in cli_result.stdout
|
||||||
|
@ -113,6 +118,10 @@
|
||||||
ansible.builtin.include_tasks: rhsso_cli.yml
|
ansible.builtin.include_tasks: rhsso_cli.yml
|
||||||
vars:
|
vars:
|
||||||
query: "patch apply {{ patch_archive }}"
|
query: "patch apply {{ patch_archive }}"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ keycloak_service_user }}"
|
||||||
|
|
||||||
- name: "Restart server to ensure patch content is running"
|
- name: "Restart server to ensure patch content is running"
|
||||||
ansible.builtin.include_tasks: rhsso_cli.yml
|
ansible.builtin.include_tasks: rhsso_cli.yml
|
||||||
|
@ -120,6 +129,10 @@
|
||||||
query: "shutdown --restart"
|
query: "shutdown --restart"
|
||||||
when:
|
when:
|
||||||
- cli_result.rc == 0
|
- cli_result.rc == 0
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ keycloak_service_user }}"
|
||||||
|
|
||||||
- name: "Wait until {{ keycloak.service_name }} becomes active {{ keycloak.health_url }}"
|
- name: "Wait until {{ keycloak.service_name }} becomes active {{ keycloak.health_url }}"
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
|
@ -133,7 +146,11 @@
|
||||||
ansible.builtin.include_tasks: rhsso_cli.yml
|
ansible.builtin.include_tasks: rhsso_cli.yml
|
||||||
vars:
|
vars:
|
||||||
query: "patch info"
|
query: "patch info"
|
||||||
|
args:
|
||||||
|
apply:
|
||||||
|
become: yes
|
||||||
|
become_user: "{{ keycloak_service_user }}"
|
||||||
|
|
||||||
- name: "Verify installed patch version"
|
- name: "Verify installed patch version"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
|
@ -144,3 +161,7 @@
|
||||||
- name: "Skipping patch"
|
- name: "Skipping patch"
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "Cumulative patch {{ patch_version }} already installed, skipping patch installation."
|
msg: "Cumulative patch {{ patch_version }} already installed, skipping patch installation."
|
||||||
|
when:
|
||||||
|
- cli_result is defined
|
||||||
|
- cli_result.stdout is defined
|
||||||
|
- patch_version in cli_result.stdout
|
||||||
|
|
Loading…
Add table
Reference in a new issue