94 lines
5.1 KiB
Django/Jinja
94 lines
5.1 KiB
Django/Jinja
# [{{ role_name }}](#{{ role_name }})
|
|
|
|
{{ meta.galaxy_info.description }}
|
|
|
|
|GitHub|GitLab|Quality|Downloads|Version|
|
|
|------|------|-------|---------|-------|
|
|
|[](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/actions)|[](https://gitlab.com/{{ gitlab_namespace }}/ansible-role-{{ role_name }})|[ }})](https://galaxy.ansible.com/{{ github_namespace }}/{{ role_name }})|[ }})](https://galaxy.ansible.com/{{ github_namespace }}/{{ role_name }})|[](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/releases/)|
|
|
|
|
## [Example Playbook](#example-playbook)
|
|
|
|
This example is taken from [`molecule/default/converge.yml`](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.
|
|
|
|
```yaml
|
|
{{ example.content | b64decode | regex_replace('ansible-role-', galaxy_namespace ~ '.') }}```
|
|
|
|
{% if prepare.content is defined %}
|
|
The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/blob/master/molecule/default/prepare.yml):
|
|
|
|
```yaml
|
|
{{ prepare.content | b64decode | regex_replace('ansible-role-', galaxy_namespace ~ '.') }}```
|
|
|
|
{% endif %}
|
|
Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.
|
|
|
|
{% if variables.content is defined %}
|
|
## [Role Variables](#role-variables)
|
|
|
|
The default values for the variables are set in [`defaults/main.yml`](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/blob/master/defaults/main.yml):
|
|
|
|
```yaml
|
|
{{ variables.content | b64decode }}```
|
|
{% endif %}
|
|
|
|
## [Requirements](#requirements)
|
|
|
|
- pip packages listed in [requirements.txt](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/blob/master/requirements.txt).
|
|
|
|
{% if requirements is defined and requirements.roles is defined %}
|
|
## [State of used roles](#state-of-used-roles)
|
|
|
|
The following roles are used to prepare a system. You can prepare your system in another way.
|
|
|
|
| Requirement | GitHub | GitLab |
|
|
|-------------|--------|--------|
|
|
{% for requirement in requirements.roles %}
|
|
|[{{ requirement.name }}](https://galaxy.ansible.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.') }})|[ }}/workflows/Ansible%20Molecule/badge.svg)](https://github.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/actions)|[ }}/badges/master/pipeline.svg)](https://gitlab.com/{{ gitlab_namespace }}/{{ requirement.name | regex_replace(galaxy_namespace + '\.', 'ansible-role-') }})|
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if meta.dependencies %}
|
|
## [Dependencies](#dependencies)
|
|
|
|
Most roles require some kind of preparation, this is done in `molecule/default/prepare.yml`. This role has a "hard" dependency on the following roles:
|
|
|
|
{% for dependency in meta.dependencies %}
|
|
- {{ dependency }}
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
## [Context](#context)
|
|
|
|
This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.
|
|
|
|
Here is an overview of related roles:
|
|

|
|
|
|
## [Compatibility](#compatibility)
|
|
|
|
This role has been tested on these [container images](https://hub.docker.com/u/robertdebock):
|
|
|
|
|container|tags|
|
|
|---------|----|
|
|
{% for platform in meta.galaxy_info.platforms %}
|
|
|[{{ platform.name }}]({{ image_docker_hub_url_mapping[platform.name | lower] }})|{% for version in platform.versions %}{{ version }}{% if not loop.last %}, {% endif %}{% endfor %}|
|
|
{% endfor %}
|
|
|
|
The minimum version of Ansible required is {{ meta.galaxy_info.min_ansible_version }}, tests have been done to:
|
|
|
|
- The previous version.
|
|
- The current version.
|
|
- The development version.
|
|
|
|
If you find issues, please register them in [GitHub](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/issues)
|
|
|
|
## [License](#license)
|
|
|
|
[{{ meta.galaxy_info.license }}](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/blob/master/LICENSE).
|
|
|
|
## [Author Information](#author-information)
|
|
|
|
[{{ meta.galaxy_info.author }}]({{ author_website }})
|
|
|
|
Please consider [sponsoring me](https://github.com/sponsors/robertdebock).
|