diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..15c1102 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: Ansible Role Percona XtraDB Cluster +'on': + push: + +defaults: + run: + working-directory: 'percona_xtradb_cluster' + +jobs: + + lint: + name: Linting ansible role bmeme.percona_xtradb_cluster + runs-on: ubuntu-latest + steps: + - + name: Check out the codebase. + uses: actions/checkout@v3 + - + name: Run ansible-lint + uses: ansible/ansible-lint@main + + # test: + # name: Testing ansible role bmeme.percona_xtradb_cluster + # runs-on: ubuntu-latest + # needs: [lint] + # strategy: + # matrix: + # distro: ["rockylinux:8.7-2.11", "rockylinux:8.8-2.11", "rockylinux:8.9-2.11", "rockylinux:9.3-2.15"] + # steps: + # - + # name: Check out the codebase. + # uses: actions/checkout@v3 + # - + # name: Molecule test + # uses: gofrolist/molecule-action@v2 + # with: + # molecule_options: --debug + # molecule_args: -d docker + # molecule_command: test + # env: + # ANSIBLE_FORCE_COLOR: '1' + # MOLECULE_DISTRO: ${{ matrix.distro }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c36a8f9..a6e22d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,3 @@ -# This workflow requires a GALAXY_API_KEY secret present in the GitHub -# repository or organization. -# -# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy - name: Ansible Role Percona XtraDB Cluster 'on': push: diff --git a/README.md b/README.md index fab8797..478d0f4 100644 --- a/README.md +++ b/README.md @@ -117,8 +117,11 @@ mysql_cluster_configuration: |- ``` ## Supported Linux distro and versions -- EL 7 - EL 8 +- EL 9 + +EOL 7 is no longer officially supported. As far as we know, the role can currently continue +to work properly on EL 7.9; we are unsure if it works on lower versions." ## Dependencies N/A @@ -173,7 +176,7 @@ A CI actions is not active for this role. This because (I don't know why...) rol MIT / BSD ## Author Information -This role was created in 2022 by [Bmeme](https://www.bmeme.com). It is actually maintained by [Daniele Piaggesi](https://github.com/g0blin79), [Roberto Mariani](https://github.com/jean-louis) and [Michele Mondelli](https://github.com/Mithenks) +This role was created in 2022 by [Bmeme](https://www.bmeme.com). It is actually maintained by [Daniele Piaggesi](https://github.com/g0blin79) and [Roberto Mariani](https://github.com/jean-louis). ## Credits This role was really inspired by [csuka Ansible Role XtraDB Cluster](https://github.com/csuka/ansible_role_percona_xtradb_cluster). \ No newline at end of file diff --git a/meta/main.yml b/meta/main.yml index 922692f..84f82f3 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -12,6 +12,7 @@ galaxy_info: versions: - "7" - "8" + - "9" galaxy_tags: - database diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index d5759fe..08fc49d 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -2,7 +2,6 @@ scenario: test_sequence: - dependency - - lint - cleanup - destroy - syntax @@ -18,12 +17,9 @@ dependency: name: galaxy driver: name: docker -lint: | - set -e - yamllint . platforms: - name: test-cluster-01 - image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}" + image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}" command: "/usr/sbin/init" volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw @@ -31,7 +27,7 @@ platforms: cgroupns_mode: host pre_build_image: true - name: test-cluster-02 - image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}" + image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}" command: "/usr/sbin/init" volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw @@ -39,7 +35,7 @@ platforms: cgroupns_mode: host pre_build_image: true - name: test-cluster-03 - image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-centos:7.9}" + image: "bmeme/docker-ansible-${MOLECULE_DISTRO:-rockylinux:8.7-2.11}" command: "/usr/sbin/init" volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw @@ -49,5 +45,8 @@ platforms: provisioner: name: ansible log: true + lint: + name: ansible-lint + enabled: true verifier: name: ansible \ No newline at end of file diff --git a/vars/RedHat-9.yml b/vars/RedHat-9.yml new file mode 100644 index 0000000..4843572 --- /dev/null +++ b/vars/RedHat-9.yml @@ -0,0 +1,31 @@ +--- +__percona_rpm_key_url: "https://www.percona.com/downloads/RPM-GPG-KEY-percona" +__percona_repo_baseurl: "https://repo.percona.com/yum" +__percona_repo_release: "percona-release-latest" +__percona_version: "57" +__percona_mysql_daemon: mysql +__percona_arbiter_daemon: garb +__percona_required_packages: + - python3-PyMySQL + - gnupg2 + - socat + - python3 + - openssl + - diffutils + - iproute +__percona_packages_57: + - Percona-XtraDB-Cluster-57 + - percona-xtrabackup-24 +__percona_packages_80: + - percona-xtradb-cluster +__percona_arbiter_packages_57: + - Percona-XtraDB-Cluster-garbd-57 +__percona_arbiter_packages_80: + - percona-xtradb-cluster-garbd +__mysql_log_file_group: mysql +__mysql_log_error: /var/log/mysqld.log +__mysql_pid_file: /var/run/mysqld/mysqld.pid +__mysql_config_file: /etc/my.cnf +__mysql_config_include_dir: /etc/percona-xtradb-cluster.conf.d/ +__mysql_socket: /var/lib/mysql/mysql.sock +__garb_config_file: "/etc/sysconfig"