{"id":384,"sha1":"473036b1110dc7680c729223a46ab6b893471a6f","playbook":{"id":3,"items":{"plays":37,"tasks":589,"results":576,"hosts":7,"files":222,"records":0},"arguments":{"version":null,"verbosity":0,"private_key_file":null,"remote_user":null,"connection":"openstack.osa.ssh","timeout":null,"ssh_common_args":null,"sftp_extra_args":null,"scp_extra_args":null,"ssh_extra_args":null,"ask_pass":false,"connection_password_file":null,"force_handlers":true,"flush_cache":false,"become":false,"become_method":"sudo","become_user":null,"become_ask_pass":false,"become_password_file":null,"tags":["all"],"skip_tags":[],"check":false,"diff":false,"inventory":["/home/zuul/src/opendev.org/openstack/openstack-ansible/inventory/dynamic_inventory.py","/home/zuul/src/opendev.org/openstack/openstack-ansible/inventory/inventory.ini","/etc/openstack_deploy/inventory.ini"],"listhosts":false,"subset":null,"extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":4,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["setup-infrastructure.yml"]},"labels":[{"id":1,"name":"check:False"},{"id":2,"name":"tags:all"}],"started":"2025-12-08T13:50:33.014895Z","ended":"2025-12-08T13:57:00.819740Z","duration":"00:06:27.804845","name":null,"ansible_version":"2.18.6","client_version":"1.7.4","python_version":"3.12.11","server_version":"1.7.4","status":"completed","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible/playbooks/setup-infrastructure.yml","controller":"aio1.openstack.local","user":"root"},"content":"---\n# Copyright 2016, Rackspace US, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Unfortunately yum is case-insensitive, and RDO has mariadb-* packages,\n# while the MariaDB repo has MariaDB-* packages and they conflict.\n# To work around this we have to query for any installed RDO/CentOS\n# packages using rpm, then remove them. We have to remove them without\n# dependencies, otherwise for distro package installation types on shared\n# hosts it removes far too many packages.\n- name: Remove conflicting packages\n  ansible.builtin.shell: |\n    exit_code=0\n    for pkg in {{ galera_mariadb_distro_packages_remove | join(' ') }}; do\n      if rpm --query --quiet ${pkg}; then\n        rpm -ev --nodeps ${pkg}\n        exit_code=2\n      fi\n    done\n    exit ${exit_code}\n  register: _remove_existing_mariadb_packages\n  changed_when: _remove_existing_mariadb_packages.rc == 2\n  failed_when: _remove_existing_mariadb_packages.rc not in [0, 2]\n  when: galera_install_method == 'external_repo'\n  args:\n    executable: /bin/bash\n\n# In CentOS systems, /etc/my.cnf.d may already exist on the\n# system. We need to ensure that it is removed if that is true so\n# that we can replace it with symlinks to the directories expected\n# to be used by the MariaDB packages instead.\n- name: Stat /etc/my.cnf.d\n  ansible.builtin.stat:\n    path: /etc/my.cnf.d\n    get_attributes: false\n    get_checksum: false\n    get_mime: false\n  register: mycnfd_stat\n\n- name: Destroy my.cnf.d dir if is dir\n  ansible.builtin.file:\n    path: /etc/my.cnf.d\n    state: absent\n    force: true\n  when:\n    - mycnfd_stat.stat.isdir is defined\n    - mycnfd_stat.stat.isdir\n\n# We replace the default paths for the system with symlinks to\n# the paths used by the MariaDB packages so ensure that any other\n# system expectations are still met.\n- name: Update the local file system CRUD\n  ansible.builtin.file:\n    src: \"{{ item.src | default(omit) }}\"\n    path: \"{{ item.path }}\"\n    state: \"{{ item.state }}\"\n    force: \"{{ item.force | default(omit) }}\"\n    mode: \"{{ item.mode | default(omit) }}\"\n  with_items:\n    - path: \"/etc/mysql\"\n      state: \"directory\"\n      mode: \"0755\"\n    - path: \"/etc/mysql/conf.d\"\n      state: \"directory\"\n    - src: \"/usr/lib64/galera\"\n      path: \"/usr/lib/galera\"\n      state: \"link\"\n      force: true\n    - src: \"/etc/mysql/conf.d\"\n      path: \"/etc/my.cnf.d\"\n      state: \"link\"\n      force: true\n    - src: \"/etc/mysql/my.cnf\"\n      path: \"/etc/my.cnf\"\n      state: \"link\"\n      force: true\n\n- name: If a keyfile is provided, copy the gpg keyfile to the key location\n  ansible.builtin.copy:\n    src: \"gpg/{{ item.key | basename }}\"\n    dest: \"{{ item.key }}\"\n    mode: \"0644\"\n  with_items: \"{{ galera_gpg_keys }}\"\n  when:\n    - galera_install_method == 'external_repo'\n\n- name: Add galera repo\n  ansible.builtin.yum_repository:\n    name: \"{{ galera_repo.name }}\"\n    description: \"{{ galera_repo.description }}\"\n    baseurl: \"{{ galera_repo.baseurl }}\"\n    gpgkey: \"{{ galera_repo.gpgkey | default(omit) }}\"\n    gpgcheck: true\n    enabled: true\n    module_hotfixes: true\n    priority: 25\n    state: \"{{ galera_repo.state | default(omit) }}\"\n  register: add_galera_repos\n  until: add_galera_repos is success\n  retries: 5\n  delay: 2\n\n- name: Install galera role remote packages\n  ansible.builtin.package:\n    name: \"{{ galera_packages_list }}\"\n    state: \"{{ galera_package_state }}\"\n  register: install_remote_packages\n  until: install_remote_packages is success\n  retries: 5\n  delay: 2\n  notify:\n    - Restart all mysql\n","created":"2025-12-08T13:53:18.388540Z","updated":"2025-12-08T13:53:18.388567Z","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible-galera_server/tasks/galera_install_dnf.yml"}