Skip to content

chore(github actions): use refactored workflows - #9

Merged
medanthelinium merged 5 commits into
masterfrom
refactored-shared-workflow
Feb 17, 2026
Merged

medanthelinium merged 5 commits into
masterfrom
refactored-shared-workflow

Conversation

@pilz0

@pilz0 pilz0 commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates this Ansible role repository to rely on a shared GitHub Actions CI workflow and refreshes generated documentation accordingly.

Changes:

  • Replace in-repo CI workflows with a single reusable workflow call (.github/workflows/ansible.yml).
  • Simplify meta/argument_specs.yml by removing nested option schemas for several dict arguments and updating doc strings.
  • Regenerate/update README.md from the updated argument specs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
meta/argument_specs.yml Updates argument spec descriptions (including the config-path example) and replaces structured nested schemas with free-text for some dict options.
README.md Regenerated to match the updated argument specs (nested option sections removed; descriptions updated).
.github/workflows/test.yml Removes prior explicit ansible-lint + Molecule matrix workflow.
.github/workflows/generate_readme.yml Removes prior README auto-generation/commit workflow.
.github/workflows/ansible.yml Adds new CI workflow delegating to punktDe/shared-workflows reusable workflow and passes Galaxy API key secret.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ansible.yml Outdated
ansible-role:
uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@main
secrets:
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}

Copilot AI Feb 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repo previously had a dedicated workflow to regenerate README.md from meta/argument_specs.yml (aar-doc) and commit the result. With that workflow removed, the README generation step is no longer automated even though the README states it is generated and should not be edited manually; consider re-adding an equivalent job (or confirming the shared workflow handles it) so docs don’t drift.

Suggested change
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
aar-doc:
uses: punktDe/shared-workflows/.github/workflows/ansible-role-readme.yml@main
secrets:
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +8
name: CI
on:
push:
workflow_dispatch:
jobs:
ansible-role:
uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@main

Copilot AI Feb 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous CI defined explicit linting + a Molecule OS matrix in-repo; this workflow delegates everything to the shared workflow without showing what runs here. If the shared workflow doesn’t include the same lint/molecule coverage (and OS matrix), this change reduces CI signal for this role; consider documenting/encoding the required checks via inputs or an explicit matrix in this repo.

Copilot uses AI. Check for mistakes.
Comment thread meta/argument_specs.yml
description:
- List of client addresses (e.g. 127.0.0.1) for which a pg_hba.conf host entry is added.
- Used together with privileges to allow password authentication from those hosts.
- "Values should contain: username (str), password (str, optional), role_attributes (dict, optional), hosts (list, optional)."

Copilot AI Feb 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postgresql.users no longer defines nested options (username/password/role_attributes/hosts) in the role argument spec and instead embeds the schema in free-text. This is a documentation/validation regression for tools consuming meta/argument_specs.yml (including your README generator); consider restoring the structured options block if you still want per-field docs and machine-checked inputs.

Suggested change
- "Values should contain: username (str), password (str, optional), role_attributes (dict, optional), hosts (list, optional)."
options:
username:
type: "str"
description:
- Name of the PostgreSQL role/user to create.
password:
type: "str"
description:
- Password for the user (optional; if omitted, passwordless or external auth may be used).
role_attributes:
type: "dict"
description:
- Additional role attributes for the user (optional; mapping of attribute names to values).
hosts:
type: "list"
elements: "str"
description:
- List of hosts for which this user should be allowed to connect (optional).

Copilot uses AI. Check for mistakes.
Comment thread meta/argument_specs.yml
type: "list"
elements: "str"
description: List of privilege names (e.g. ALL, SELECT, INSERT).
- "Values should contain: username (str), database (str), type (str, default: table), objs (str, optional), schema (str, optional), privs (list)."

Copilot AI Feb 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postgresql.privileges no longer defines nested options in the role argument spec and instead embeds the expected fields in a single description string. If you rely on structured argument spec docs/validation, restore the options block so individual fields (database/type/objs/schema/privs, etc.) are discoverable and type-checked.

Suggested change
- "Values should contain: username (str), database (str), type (str, default: table), objs (str, optional), schema (str, optional), privs (list)."
options:
username:
type: "str"
description: PostgreSQL role (user) to grant privileges to.
database:
type: "str"
description: Database on which to grant the privileges.
type:
type: "str"
default: table
description: Object type to grant privileges on (e.g. table).
objs:
type: "str"
description: Name or pattern of objects to which privileges apply (optional).
schema:
type: "str"
description: Schema containing the objects (optional).
privs:
type: "list"
elements: "str"
description: List of privileges to grant (e.g. SELECT, INSERT).

Copilot uses AI. Check for mistakes.
Comment thread meta/argument_specs.yml
import_file:
type: "path"
description: Path to a dump file to restore into the database after creation (optional).
- "Values should contain: name (str), owner (str), encoding (str, optional), lc_collate (str, optional), lc_ctype (str, optional), template (str, optional), import_file (path, optional)."

Copilot AI Feb 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postgresql.databases no longer defines nested options in the role argument spec and instead documents the expected keys in free-text. This reduces generated docs fidelity and prevents schema-aware validation; consider restoring the structured options block if that detail is still desired.

Suggested change
- "Values should contain: name (str), owner (str), encoding (str, optional), lc_collate (str, optional), lc_ctype (str, optional), template (str, optional), import_file (path, optional)."
options:
name:
type: "str"
required: true
description: Name of the PostgreSQL database to create.
owner:
type: "str"
required: true
description: PostgreSQL role that will own the database.
encoding:
type: "str"
required: false
description: Encoding for the database (e.g. UTF-8). If omitted, database_defaults.encoding is used.
lc_collate:
type: "str"
required: false
description: Locale for string sort order. If omitted, database_defaults.lc_collate is used.
lc_ctype:
type: "str"
required: false
description: Locale for character classification. If omitted, database_defaults.lc_ctype is used.
template:
type: "str"
required: false
description: Template database to copy when creating the database. If omitted, database_defaults.template is used.
import_file:
type: "path"
required: false
description: Path to an SQL file to import into the database after creation.

Copilot uses AI. Check for mistakes.
workflow_dispatch:
jobs:
ansible-role:
uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@main

Copilot AI Feb 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow is referenced at punktDe/shared-workflows/...@main. Pin this to a tagged release or a specific commit SHA to avoid unreviewed changes in the shared workflow being pulled into CI (supply-chain risk) and to make builds reproducible.

Suggested change
uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@main
uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@<PINNED_TAG_OR_SHA>

Copilot uses AI. Check for mistakes.
@medanthelinium
medanthelinium merged commit 7f7df2c into master Feb 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants