[#46] Static tests instead of parameters

This commit is contained in:
Christian Ardiente Eda 2020-12-29 10:20:26 +01:00
parent 21de58a20b
commit cceaac7b86
2 changed files with 32 additions and 31 deletions

View File

@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch
### Added ### Added
### Changed ### Changed
- *[#47](https://github.com/idealista/cookiecutter-ansible-role/pull/47) Bump goss version from 0.3.14 to 0.3.16* @vicsufer - *[#47](https://github.com/idealista/cookiecutter-ansible-role/pull/47) Bump goss version from 0.3.14 to 0.3.16* @vicsufer
- *[#46](https://github.com/idealista/cookiecutter-ansible-role/issues/46) Static tests instead of parameters* @xtianae7
### Removed ### Removed
## [2.3.0](https://github.com/idealista/cookiecutter-ansible-role/tree/2.3.0) ## [2.3.0](https://github.com/idealista/cookiecutter-ansible-role/tree/2.3.0)

View File

@ -1,36 +1,36 @@
--- ---
file:
{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_bin_path {% raw %}}}{% endraw %}:
{% if cookiecutter.has_service == 'True' %}
owner: {% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_user {% raw %}}}{% endraw %}
group: {% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %}
{% endif %}
exists: true
filetype: directory
{% if cookiecutter.has_service == 'True' %}
# port:
# # Check port at IPv6
# # https://github.com/aelsabbahy/goss/issues/177
# tcp6:{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_port {% raw %}}}{% endraw %}:
# listening: true
# ip:
# - '::'
service: service:
{{ cookiecutter.app_name }}: {{ cookiecutter.app_name }}:
enabled: true enabled: true
running: true running: true
process: ## Goss Documentation: https://github.com/aelsabbahy/goss/blob/master/docs/manual.md
{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_exec_name {% raw %}}}{% endraw %}: ## Minimum recommended tests to have in every role
running: true # process:
user: # exec_name:
{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_user {% raw %}}}{% endraw %}: # running: true
exists: true # user:
groups: # example_user:
- {% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %} # exists: true
shell: /usr/sbin/nologin # groups:
group: # - example_group
{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %}: # shell: /usr/sbin/nologin
exists: true # group:
{% endif %} # example_group:
# exists: true
#
## Tests to check if the needed directories were created propperly
# file:
# bin_path:
# owner: example_user
# group: % example_group
# exists: true
# filetype: directory
#
## Check if ports are really exposed
# port:
# # Check port at IPv6
# # https://github.com/aelsabbahy/goss/issues/177
# tcp6:<port>:
# listening: true
# ip:
# - '::'