kolla-ansible/ansible/roles/keystone/tasks/upgrade.yml
Ivan Halomi 4ca2d41762 Adding container_engine to kolla_toolbox module
Second part of patchset:
https://review.opendev.org/c/openstack/kolla-ansible/+/799229/
in which was suggested to split patch into smaller ones.

THis change adds container_engine to module parameters
so when we introduce podman, kolla_toolbox can be used
for both engines.

Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com>
Co-authored-by: Martin Hiner <m.hiner@partner.samsung.com>
Change-Id: Ic2093aa9341a0cb36df8f340cf290d62437504ad
2022-11-04 15:32:30 +01:00

62 lines
1.9 KiB
YAML

---
- import_tasks: config.yml
- import_tasks: check-containers.yml
- name: Enable log_bin_trust_function_creators function
become: true
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
module_name: mysql_variables
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ keystone_database_shard_root_user }}"
login_password: "{{ database_password }}"
variable: log_bin_trust_function_creators
value: 1
run_once: True
when:
- inventory_hostname == groups['keystone'][0]
- not use_preconfigured_databases | bool
- name: Init keystone database upgrade
command: /bin/true
notify: Init keystone database upgrade
when: inventory_hostname == groups['keystone'][0]
- name: Finish keystone database upgrade
command: /bin/true
notify: Finish keystone database upgrade
when: inventory_hostname == groups['keystone'][-1]
- name: Flush handlers
meta: flush_handlers
- name: Disable log_bin_trust_function_creators function
become: true
kolla_toolbox:
container_engine: "{{ kolla_container_engine }}"
module_name: mysql_variables
module_args:
login_host: "{{ database_address }}"
login_port: "{{ database_port }}"
login_user: "{{ keystone_database_shard_root_user }}"
login_password: "{{ database_password }}"
variable: log_bin_trust_function_creators
value: 0
run_once: True
when:
- not use_preconfigured_databases | bool
# TODO(yoctozepto): Remove after Zed (in AA).
# This is needed to update the admin endpoint as the port has
# changed in the same release (Zed), i.e., the admin endpoint uses the
# same port as the other ones (public, internal).
- import_role:
name: service-ks-register
vars:
service_ks_register_auth: "{{ openstack_keystone_auth }}"
service_ks_register_services: "{{ keystone_ks_services }}"
run_once: True