|
|
||
|---|---|---|
| .github/workflows | ||
| defaults | ||
| files | ||
| templates | ||
| vars | ||
| .gitignore | ||
| .yamllint | ||
| LICENSE | ||
| README-gitlab.md | ||
| README.md | ||
| ansible.cfg | ||
| community.general.sh | ||
| generate.yml | ||
| get-galaxy-platforms.py | ||
| github.yml | ||
| gitlab-delete-project.yml | ||
| gitlab-import.yml | ||
| gitlab-pipeline-trigger.yml | ||
| gitlab-public.yml | ||
| gitlab-pull-mirror.yml | ||
| gitlab.yml | ||
| indexer.sh | ||
README.md
ansible-generator
Generate documentation and continuous integration files for an Ansible Role.
Input
This script loads input from:
- meta/main.yml*
- meta/preferences.yml
- defaults/main.yml
- requirements.yml
- molecule/default/prepare.yml
- molecule/default/converge.yml*
- molecule/default/verify.yml
- generate_modules.sh
- secure.yml
- Ansible Galaxy
(Items with a star are mandatory)
Output
This script writes output to:
- README.md
- molecule/default/molecule.yml
- CONTRIBUTING.md
- SECURITY.md
- LICENSE
- .travis.yml
- tox.ini
- .ansible-lint*
- .github/workflows/ansible.yml
- .github/workflows/galaxy.yml
Usage
cd ansible-role-my_role
../path/to/generate.yml
Configuration
In vars/main.yml you can change these variable to customize the output.
---
# Settings to Docker containers.
docker_namespace: robertdebock
docker_image: fedora
docker_tag: latest
# References to travis use a namespace, this is likely your username on Travis.
travis_namespace: robertdebock
# Documentation refers to Ansible Galaxy. this is likely your username on Galaxy.
galaxy_namespace: robertdebock
# Your username/organization name on GitHub.
github_namespace: robertdebock
# Your name and optionally email-address.
author: Robert de Bock (robert@meinit.nl)
# The full URL to your website.
author_website: "https://robertdebock.nl/"
meta/preferences.yml
This optional file describes how Travis, 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:
- 7
github_variables_mapping:
- name: secrets.VAULT_LICENSE
variable: VAULT_LICENCE
- name: secrets.MY_VAR
variable: someTHING