ansible-generator/templates
Robert de Bock 7cb81c4f96 Sweeper. 2021-02-18 13:09:28 +01:00
..
CONTRIBUTING.md.j2 Fix related to https://github.com/robertdebock/ansible-role-cis/pull/1 2020-08-08 16:59:07 +02:00
LICENSE-2.0.txt.j2 Initial commit 2019-12-04 07:14:52 +01:00
README.md.j2 Sweeper. 2021-02-18 13:09:28 +01:00
SECURITY.md.j2 Markdown anchors. 2020-06-04 20:38:39 +02:00
ansible-lint.j2 Sweeper. 2021-02-18 13:09:28 +01:00
galaxy.yml.j2 Add 2 enterprise-grade pre-commit hooks. 2021-01-05 15:47:21 +01:00
gitlab-ci.yml.j2 Sweeper. 2021-02-18 13:09:28 +01:00
molecule-action.yml.j2 Sweeper. 2021-02-18 13:09:28 +01:00
molecule.yml.j2 Sweeper. 2021-02-18 13:09:28 +01:00
requirements.txt.j2 Add 2 enterprise-grade pre-commit hooks. 2021-01-05 15:47:21 +01:00
requirements2png.yml.j2 Sweeper. 2021-02-18 13:09:28 +01:00
settings.yml.j2 Add suggested topics. 2020-10-15 21:32:41 +02:00
todo-action.yml.j2 Add 2 enterprise-grade pre-commit hooks. 2021-01-05 15:47:21 +01:00
tox.ini.j2 Sweeper. 2021-02-18 13:09:28 +01:00
travis.yml.j2 Add 2 enterprise-grade pre-commit hooks. 2021-01-05 15:47:21 +01:00

README.md.j2

# [{{ role_name }}](#{{ role_name }})

{{ meta.galaxy_info.description }}

|GitHub|GitLab|Quality|Downloads|Version|
|------|------|-------|---------|-------|
|[![github](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/workflows/Ansible%20Molecule/badge.svg)](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/actions)|[![gitlab](https://gitlab.com/{{ github_namespace }}/ansible-role-{{ role_name }}/badges/master/pipeline.svg)](https://gitlab.com/{{ github_namespace }}/ansible-role-{{ role_name }})|[![quality](https://img.shields.io/ansible/quality/{{ galaxy_id.stdout | default('unset') }})](https://galaxy.ansible.com/{{ github_namespace }}/{{ role_name }})|[![downloads](https://img.shields.io/ansible/role/d/{{ galaxy_id.stdout |default('unset') }})](https://galaxy.ansible.com/{{ github_namespace }}/{{ role_name }})|[![Version](https://img.shields.io/github/release/{{ github_namespace }}/ansible-role-{{ role_name }}.svg)](https://github.com/{{ github_namespace }}/ansible-role-{{ role_name }}/releases/)|

## [Example Playbook](#example-playbook)

This example is taken from `molecule/resources/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/resources/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)

These variables are set in `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 %}
## [Status of requirements](#status-of-requirements)

The following roles are used to prepare a system. You may choose to prepare your system in another way, I have tested these roles as well.

| Requirement | GitHub | GitLab |
|-------------|--------|--------|
{% for requirement in requirements.roles %}
| [{{ requirement.name }}](https://galaxy.ansible.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.') }}) | [![Build Status GitHub](https://github.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/workflows/Ansible%20Molecule/badge.svg)](https://github.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/actions) | [![Build Status GitLab ](https://gitlab.com/{{ github_namespace }}/ansible-role-{{ requirement.name | regex_replace(github_namespace + '\.', 'ansible-role-') }}/badges/master/pipeline.svg)](https://gitlab.com/{{ github_namespace }}/{{ requirement.name | regex_replace(github_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:
![dependencies](https://raw.githubusercontent.com/{{ github_namespace }}/ansible-role-{{ role_name }}/png/requirements.png "Dependencies")

## [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 | 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 exceptions is defined %}
## [Exceptions](#exceptions)

Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work:

| variation                 | reason                 |
|---------------------------|------------------------|
{% for exception in exceptions %}| {{ exception.variation }} | {{ exception.reason }} |
{% endfor %}{% endif %}

{% if versions is defined %}
## [Included version(s)](#included-versions)

This role [refers to a version]({{ reference }}) released by {{ project_name }}. Check the released version(s) here:
{% for version in versions %}
- [{{ version.name }}]({{ version.url }}).
{% endfor %}

This version reference means a role may get outdated. Monthly tests occur to see if [bit-rot](https://en.wikipedia.org/wiki/Software_rot) occured. If you however find a problem, please create an issue, I'll get on it as soon as possible.{% endif %}

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 }}

{% if github_contributors is defined %}
{% if github_contributors.json is defined %}
{% if github_contributors.json | length > 1 %}
## [Contributors](#contributors)

I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate.

{% for contributor in github_contributors.json %}{% if contributor.login is defined %}{% if contributor.login != "robertdebock" %}
- [{{ contributor.login }}](https://github.com/{{ contributor.login }})
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}

## [Author Information](#author-information)

[{{ meta.galaxy_info.author }}]({{ author_website }})

Please consider [sponsoring me](https://github.com/sponsors/robertdebock).