Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buluma/ansible-generator
Generate documentation and continuous integration files for an Ansible Role.
https://github.com/buluma/ansible-generator
ansible automation generator
Last synced: 6 days ago
JSON representation
Generate documentation and continuous integration files for an Ansible Role.
- Host: GitHub
- URL: https://github.com/buluma/ansible-generator
- Owner: buluma
- License: apache-2.0
- Created: 2022-01-31T08:01:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T05:15:18.000Z (4 months ago)
- Last Synced: 2024-07-15T06:32:44.645Z (4 months ago)
- Topics: ansible, automation, generator
- Language: Jinja
- Homepage:
- Size: 350 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```text
+--- 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 |
+-----------------+ | settings.yml |
| .github/workflows/todo.yml |
| .tox.ini |
+----------------------------------------+
```## Usage
```bash
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|[[5,6,7]](https://github.com/buluma/ansible-generator/blob/master/templates/tox.ini.j2#L7)|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
```yaml
---
tox_ansible_versions:
- 6
- 7github_variables_mapping:
- name: secrets.VAULT_LICENSE
variable: VAULT_LICENCE
- name: secrets.MY_VAR
variable: someTHING
```