Generate documentation and continuous integration files for an Ansible Role.
Go to file
Robert de Bock d98f40d9c4
Merge pull request #3 from robertdebock/only
Only
2023-02-23 09:35:48 +01:00
.github/workflows Use checkout v3 action` 2022-06-30 10:20:59 +02:00
defaults Let's Marie Kondo. 2023-02-23 09:31:16 +01:00
files Sweep 2023-01-03 14:50:40 +01:00
templates Let's Marie Kondo. 2023-02-23 09:31:16 +01:00
vars Let's Marie Kondo. 2023-02-23 09:31:16 +01:00
workflows Let's Marie Kondo. 2023-02-23 09:31:16 +01:00
.yamllint Let's help YAMLlint a bit. 2023-02-23 09:33:23 +01:00
LICENSE First line. 2023-02-23 09:01:26 +01:00
README.md Let's Marie Kondo. 2023-02-23 09:31:16 +01:00
generate.yml Let's Marie Kondo. 2023-02-23 09:31:16 +01:00

README.md

ansible-generator

Generate documentation and continuous integration files for an Ansible Role.

The intention is to focus on writing or maintaining the Ansible role, and use this tool to generate chore-like-tasks.

Overview

+--- role ----------------------+                        +--- role -------------------------------+
| meta/main.yml                 |                        | README.md                              |
| molecule/default/converge.yml |                        | bug_report.md                          |
| meta/preferences.yml          |                        | feature_requests.md                    |
| requirements.yml              |                        | FUNDING.md                             |
| molecule/default/prepare.yml  |                        | .gitignore                             |
| molecule/default/verify.yml   |                        | .pre-commit.config.yaml                |
| defaults/main.yml             |                        | .yamllint                              |
+------------------------+------+                        | .ansible-lint                          |
                         |                               | CONTRIBUTING.md                        |
+--- this tool -----+    |                               | .github/workflows/galaxy.yml           |
| defaults/main.yml | ---+                               | .gitlab-ci.yml                         |
| vars/main.yml     |    |                               | LICENSE                                |
| files/*           |    |                               | .github/workflows/molecule.yml         |
| templates/*       |    |                               | molecule/default/molecule.yml          |
+-------------------+    |       +--- this tool ---+     | .github/workflows/requirements2png.yml |
                         +------ | generate.yml    | --- | SECURITY.md                            |
+--- Galaxy ---+         |       +-----------------+     | settings.yml                           |
| galaxy_id    | --------+                               | .github/workflows/todo.yml             |
+--------------+                                         | .tox.ini                               |
                                                         +----------------------------------------+

Usage

cd ansible-role-my_role
../path/to/generate.yml

Configuration

In defaults/main.yml you can change these variable to customize the output.

Settings to Docker containers

  • docker_namespace
  • docker_image
  • docker_tag

Your username on Galaxy

  • galaxy_namespace

Your username/organization name on GitHub

  • github_namespace

Your username/group on GitLab

  • gitlab_namespace

Your name and optionally email-address

  • `author``

The full URL to your website

  • author_website

meta/preferences.yml

This (optional) file describes how Tox and Molecule should behave.

parameter type default description
tox_ansible_versions list of strings not set What versions should Tox test? (Default: all.)
github_variables_mapping list not set A list of name and variable, name refers to the GitHub exposed name, variable refers to the name you'd like to pass to molecule, tox and Ansible.

Example

---
tox_ansible_versions:
  - 6
  - 7

github_variables_mapping:
  - name: secrets.VAULT_LICENSE
    variable: VAULT_LICENCE
  - name: secrets.MY_VAR
    variable: someTHING