Repository navigation
chore(github actions): use refactored workflows - #9
Conversation
There was a problem hiding this comment.
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.ymlby removing nested option schemas for several dict arguments and updating doc strings. - Regenerate/update
README.mdfrom 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.
| ansible-role: | ||
| uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@main | ||
| secrets: | ||
| galaxy_api_key: ${{ secrets.GALAXY_API_KEY }} |
There was a problem hiding this comment.
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.
| 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 }} |
| name: CI | ||
| on: | ||
| push: | ||
| workflow_dispatch: | ||
| jobs: | ||
| ansible-role: | ||
| uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@main |
There was a problem hiding this comment.
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.
| 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)." |
There was a problem hiding this comment.
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.
| - "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). |
| 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)." |
There was a problem hiding this comment.
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.
| - "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). |
| 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)." |
There was a problem hiding this comment.
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.
| - "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. |
| workflow_dispatch: | ||
| jobs: | ||
| ansible-role: | ||
| uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@main |
There was a problem hiding this comment.
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.
| uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@main | |
| uses: punktDe/shared-workflows/.github/workflows/ansible-role.yml@<PINNED_TAG_OR_SHA> |
No description provided.