From 79b1c50295c0e96b723c8c6c74812333e3c70061 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Tue, 27 Aug 2024 16:30:43 +0200 Subject: [PATCH] :alembic: Try import role in galaxy --- .config/ansible-lint.yml | 7 ++++--- .github/workflows/galaxy.yml | 16 ++++++++++++---- meta/main.yml | 1 + molecule/debian12_galera/converge.yml | 2 +- molecule/debian12_master_slave/converge.yml | 4 ++-- molecule/debian12_upstream/converge.yml | 2 +- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.config/ansible-lint.yml b/.config/ansible-lint.yml index 463d679..963f2e8 100644 --- a/.config/ansible-lint.yml +++ b/.config/ansible-lint.yml @@ -1,9 +1,10 @@ --- -warn_list: [] - -skip_list: +warn_list: - role-name + - schema[meta] + +skip_list: [] exclude_paths: - venv/ diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index 4e88b7d..e9d5a00 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -11,7 +11,15 @@ jobs: steps: - name: Fetch code uses: actions/checkout@v4 - - name: galaxy - uses: robertdebock/galaxy-action@1.2.0 - with: - galaxy_api_key: ${{ secrets.galaxy_api_key }} + + - name: Set up Python 3. + uses: actions/setup-python@v5 + + - name: Install Ansible. + run: pip3 install ansible-core + + - name: Import role to Galaxy. + run: >- + ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} + $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) + --branch fix_galaxy diff --git a/meta/main.yml b/meta/main.yml index eac0e68..1bf1ce1 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,5 +1,6 @@ --- galaxy_info: + namespace: hanxhx role_name: mysql author: Emilien Mantel description: Install and configure MariaDB (and Galera Cluster) on Debian diff --git a/molecule/debian12_galera/converge.yml b/molecule/debian12_galera/converge.yml index 1d52e7f..ffc33d3 100644 --- a/molecule/debian12_galera/converge.yml +++ b/molecule/debian12_galera/converge.yml @@ -6,4 +6,4 @@ tasks: - name: Include role ansible.builtin.include_role: - name: "hanxhx.mysql" + name: "HanXHX.mysql" diff --git a/molecule/debian12_master_slave/converge.yml b/molecule/debian12_master_slave/converge.yml index 19df86a..3ddf568 100644 --- a/molecule/debian12_master_slave/converge.yml +++ b/molecule/debian12_master_slave/converge.yml @@ -7,7 +7,7 @@ tasks: - name: Include role ansible.builtin.include_role: - name: "hanxhx.mysql" + name: "HanXHX.mysql" - name: COPY | Deploy first dump ansible.builtin.copy: @@ -33,4 +33,4 @@ tasks: - name: Include role ansible.builtin.include_role: - name: "hanxhx.mysql" + name: "HanXHX.mysql" diff --git a/molecule/debian12_upstream/converge.yml b/molecule/debian12_upstream/converge.yml index 1d52e7f..ffc33d3 100644 --- a/molecule/debian12_upstream/converge.yml +++ b/molecule/debian12_upstream/converge.yml @@ -6,4 +6,4 @@ tasks: - name: Include role ansible.builtin.include_role: - name: "hanxhx.mysql" + name: "HanXHX.mysql"