Skip to content
Snippets Groups Projects
upgrade.yml 1.79 KiB
---
- import_tasks: config.yml

- import_tasks: check-containers.yml

- name: Enable log_bin_trust_function_creators function
  become: true
  kolla_toolbox:
    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:
    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