From 25eba0bab68041d923b60648688b024177975ae9 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 21 Jan 2025 18:47:19 +0100 Subject: [PATCH] Extend example playbook to contain valid values In case of standalone deployment of the role, it's important to avoid client-installation on server-side, as this causes a race condition, where deployed my.cnf is used before the respective user is created. Patch also adds all requirements which needed for the role execution in a standalone mode. Change-Id: I0900e1d413a80020ca4dfe7477499da25eb64689 --- examples/playbook.yml | 14 ++++++++++++++ requirements.yml | 21 +++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 requirements.yml diff --git a/examples/playbook.yml b/examples/playbook.yml index 8738898c..a15e4491 100644 --- a/examples/playbook.yml +++ b/examples/playbook.yml @@ -2,9 +2,23 @@ - name: Install Galera server hosts: galera_all user: root + serial: + - 1 + - 100% roles: - galera_server vars: galera_install_server: true + # NOTE: it is important to disable client installation on + # server, unless `galera_root_user: root` (default: admin) + galera_install_client: false + galera_root_password: secrete + +- name: Install Galera client + hosts: localhost + roles: + - galera_server + vars: + galera_install_server: false galera_install_client: true galera_root_password: secrete diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 00000000..e12a401a --- /dev/null +++ b/requirements.yml @@ -0,0 +1,21 @@ +--- +collections: +- name: openstack.config_template + source: https://opendev.org/openstack/ansible-config_template + type: git + version: 2.1.1 +- name: community.general + source: https://github.com/ansible-collections/community.general + type: git + version: 10.0.1 +- name: community.mysql + source: https://github.com/ansible-collections/community.mysql + type: git + version: 3.11.0 +roles: +- name: apt_package_pinning + src: git+https://opendev.org/openstack/openstack-ansible-apt_package_pinning + version: master +- name: systemd_service + src: git+https://opendev.org/openstack/ansible-role-systemd_service + version: master