forked from Mirrors/cookiecutter-ansible-role
Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57633e39ad | ||
|
|
668d890ce6 | ||
|
|
71711119ea | ||
|
|
cdb741f701 | ||
|
|
fb3253da25 | ||
|
|
0211cfcd29 | ||
|
|
01d41dc596 | ||
|
|
5fd7fc7e1d | ||
|
|
3514236fa0 | ||
|
|
d9964134da | ||
|
|
9a971619a7 | ||
|
|
409e7f8bd2 | ||
|
|
6a760eb1dc | ||
|
|
684428ec80 | ||
|
|
3a93e6734d | ||
|
|
5ad5453892 | ||
|
|
8e1924e9e3 | ||
|
|
519a783810 | ||
|
|
5fc3bcaa2e | ||
|
|
dacd85ef41 | ||
|
|
7e8ec829c9 | ||
|
|
cc0eb0ce7c | ||
|
|
08003a20e3 | ||
|
|
2838871c2b | ||
|
|
498bb69af5 | ||
|
|
9e12212122 | ||
|
|
bf38884dcd | ||
|
|
2372221f93 | ||
|
|
a082c79f12 | ||
|
|
921231864f | ||
|
|
c7be6405e8 | ||
|
|
53acbaa7d7 | ||
|
|
055c1ed1a8 | ||
|
|
092a44d4d2 | ||
|
|
e216704e9f | ||
|
|
1b9b8e81a2 | ||
|
|
8b089d7fdc | ||
|
|
bd4c9ee55d | ||
|
|
bfb05f9f7e | ||
|
|
2a4c935222 | ||
|
|
fc1c881864 | ||
|
|
29fef2078c | ||
|
|
3cb19fc4d9 | ||
|
|
a3fb7e6a37 |
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1 +1,2 @@
|
|||||||
|
---
|
||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
|
|||||||
1
.github/auto_assign.yml
vendored
1
.github/auto_assign.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# Set to true to add reviewers to pull requests
|
# Set to true to add reviewers to pull requests
|
||||||
addReviewers: true
|
addReviewers: true
|
||||||
|
|
||||||
|
|||||||
1
.github/stale.yml
vendored
1
.github/stale.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
issues:
|
issues:
|
||||||
# Number of days of inactivity before an issue becomes stale
|
# Number of days of inactivity before an issue becomes stale
|
||||||
daysUntilStale: 90
|
daysUntilStale: 90
|
||||||
|
|||||||
10
.travis.yml
10
.travis.yml
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
dist: xenial
|
dist: xenial
|
||||||
language: python
|
language: python
|
||||||
python: "3.7"
|
python: "3.9"
|
||||||
os: linux
|
os: linux
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
@@ -11,6 +11,12 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
- MOLECULE_DISTRO=debian:stretch-slim
|
- MOLECULE_DISTRO=debian:stretch-slim
|
||||||
- MOLECULE_DISTRO=debian:buster-slim
|
- MOLECULE_DISTRO=debian:buster-slim
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./test.sh
|
- ./test.sh
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
if: branch = master
|
||||||
|
on_success: change
|
||||||
|
on_failure: always
|
||||||
|
recipients:
|
||||||
|
- desarrollo.benders@idealista.com
|
||||||
|
|||||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -3,11 +3,41 @@ All notable changes to this project will be documented in this file.
|
|||||||
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).
|
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Fixed
|
|
||||||
### Added
|
## [2.6.1](https://github.com/idealista/cookiecutter-ansible-role/tree/2.6.1)
|
||||||
|
### [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/2.6.0...2.6.1)
|
||||||
### Changed
|
### Changed
|
||||||
|
- *[#73](https://github.com/idealista/cookiecutter-ansible-role/issues/73) Add document start to .yml files* @blalop
|
||||||
|
|
||||||
|
## [2.6.0](https://github.com/idealista/cookiecutter-ansible-role/tree/2.6.0)
|
||||||
|
### [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/2.5.1...2.6.0)
|
||||||
|
### Added
|
||||||
|
- *[#69](https://github.com/idealista/cookiecutter-ansible-role/issues/69) Email notifications in travis.* @vicsufer
|
||||||
|
### Changed
|
||||||
|
### Fixed
|
||||||
|
- *[#67](https://github.com/idealista/cookiecutter-ansible-role/issues/67) fix needed task in check_mode- @vicsufer
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
## [2.5.1](https://github.com/idealista/cookiecutter-ansible-role/tree/2.5.1)
|
||||||
|
### [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/2.5.0...2.5.1)
|
||||||
|
### Changed
|
||||||
|
- *[#63](https://github.com/idealista/cookiecutter-ansible-role/issues/63) Ignore html in gitattributes file* @blalop
|
||||||
|
### Fixed
|
||||||
|
- *[#62](https://github.com/idealista/cookiecutter-ansible-role/issues/62) molecule verify fails and breaks the run when at least one test fail* @ultraheroe
|
||||||
|
- *[#60](https://github.com/idealista/cookiecutter-ansible-role/issues/60) [BUG] Wrong state option in "Ensure skeleton log paths" task* @emepege
|
||||||
|
|
||||||
|
## [2.5.0](https://github.com/idealista/cookiecutter-ansible-role/tree/2.5.0)
|
||||||
|
### [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/2.4.1...2.5.0)
|
||||||
|
### Added
|
||||||
|
- *[#57](https://github.com/idealista/cookiecutter-ansible-role/issues/57) Added gitattributes file* @blalop
|
||||||
|
### Changed
|
||||||
|
- *[#55](https://github.com/idealista/cookiecutter-ansible-role/issues/55) Excluded non-role files from linting* @blalop
|
||||||
|
|
||||||
|
## [2.4.1](https://github.com/idealista/cookiecutter-ansible-role/tree/2.4.1)
|
||||||
|
### [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/2.4.0...2.4.1)
|
||||||
|
### Fixed
|
||||||
|
- *[#50](https://github.com/idealista/cookiecutter-ansible-role/issues/50) Tags not applied properly from playbook* @vicsufer
|
||||||
|
|
||||||
## [2.4.0](https://github.com/idealista/cookiecutter-ansible-role/tree/2.4.0)
|
## [2.4.0](https://github.com/idealista/cookiecutter-ansible-role/tree/2.4.0)
|
||||||
### [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/2.3.0...2.4.0)
|
### [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/2.3.0...2.4.0)
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
exclude_paths:
|
exclude_paths:
|
||||||
- ./molecule
|
- ./molecule
|
||||||
|
- ./.travis.yml
|
||||||
|
- ./.github
|
||||||
parseable: true
|
parseable: true
|
||||||
skip_list:
|
skip_list:
|
||||||
- '204'
|
- '204'
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
---
|
||||||
|
|
||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
issues:
|
issues:
|
||||||
# Number of days of inactivity before an issue becomes stale
|
# Number of days of inactivity before an issue becomes stale
|
||||||
daysUntilStale: 90
|
daysUntilStale: 90
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ extends: default
|
|||||||
|
|
||||||
ignore: |
|
ignore: |
|
||||||
molecule/**/tests/
|
molecule/**/tests/
|
||||||
|
.github
|
||||||
|
.travis.yml
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
braces:
|
braces:
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
command: "{% raw %}{{{% endraw %} goss_dst {% raw %}}}{% endraw %} -g {% raw %}{{{% endraw %} item {% raw %}}}{% endraw %} validate --format {% raw %}{{{% endraw %} goss_format {% raw %}}}{% endraw %}"
|
command: "{% raw %}{{{% endraw %} goss_dst {% raw %}}}{% endraw %} -g {% raw %}{{{% endraw %} item {% raw %}}}{% endraw %} validate --format {% raw %}{{{% endraw %} goss_format {% raw %}}}{% endraw %}"
|
||||||
register: test_results
|
register: test_results
|
||||||
with_items: "{% raw %}{{{% endraw %} test_files.stdout_lines {% raw %}}}{% endraw %}"
|
with_items: "{% raw %}{{{% endraw %} test_files.stdout_lines {% raw %}}}{% endraw %}"
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Display details about the Goss results
|
- name: Display details about the Goss results
|
||||||
debug:
|
debug:
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
name: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %}"
|
name: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %}"
|
||||||
system: yes
|
system: yes
|
||||||
state: present
|
state: present
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
|
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Ensure {{ cookiecutter.app_name }} user
|
- name: {{ cookiecutter.app_name | upper }} | Ensure {{ cookiecutter.app_name }} user
|
||||||
user:
|
user:
|
||||||
@@ -13,6 +15,8 @@
|
|||||||
system: yes
|
system: yes
|
||||||
shell: /usr/sbin/nologin
|
shell: /usr/sbin/nologin
|
||||||
createhome: no
|
createhome: no
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Ensure skeleton paths
|
- name: {{ cookiecutter.app_name | upper }} | Ensure skeleton paths
|
||||||
file:
|
file:
|
||||||
@@ -24,6 +28,8 @@
|
|||||||
state: directory
|
state: directory
|
||||||
with_items:
|
with_items:
|
||||||
- "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_skeleton_paths {% raw %}}}{% endraw %}"
|
- "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_skeleton_paths {% raw %}}}{% endraw %}"
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
|
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Ensure skeleton log paths
|
- name: {{ cookiecutter.app_name | upper }} | Ensure skeleton log paths
|
||||||
file:
|
file:
|
||||||
@@ -32,20 +38,27 @@
|
|||||||
owner: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_user {% raw %}}}{% endraw %}"
|
owner: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_user {% raw %}}}{% endraw %}"
|
||||||
group: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %}"
|
group: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
state: file
|
state: directory
|
||||||
when: {{ cookiecutter.app_name }}_log_file is defined
|
when: {{ cookiecutter.app_name }}_log_file is defined
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
|
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Check {{ cookiecutter.app_name }} version
|
- name: {{ cookiecutter.app_name | upper }} | Check {{ cookiecutter.app_name }} version
|
||||||
command: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_exec_name {% raw %}}}{% endraw %} --version"
|
command: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_exec_name {% raw %}}}{% endraw %} --version"
|
||||||
register: {{ cookiecutter.app_name }}_check
|
register: {{ cookiecutter.app_name }}_check
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
check_mode: no
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
|
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Download package
|
- name: {{ cookiecutter.app_name | upper }} | Download package
|
||||||
get_url:
|
get_url:
|
||||||
url: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_url {% raw %}}}{% endraw %}"
|
url: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_url {% raw %}}}{% endraw %}"
|
||||||
dest: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_package_path {% raw %}}}{% endraw %}"
|
dest: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_package_path {% raw %}}}{% endraw %}"
|
||||||
when: {{ cookiecutter.app_name }}_force_reinstall or {{ cookiecutter.app_name }}_check is failed or {{ cookiecutter.app_name }}_version not in {{ cookiecutter.app_name }}_check.stderr
|
when: {{ cookiecutter.app_name }}_force_reinstall or {{ cookiecutter.app_name }}_check is failed or {{ cookiecutter.app_name }}_version not in {{ cookiecutter.app_name }}_check.stderr
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
|
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Extract downloaded package
|
- name: {{ cookiecutter.app_name | upper }} | Extract downloaded package
|
||||||
unarchive:
|
unarchive:
|
||||||
@@ -53,6 +66,8 @@
|
|||||||
dest: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_download_path {% raw %}}}{% endraw %}"
|
dest: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_download_path {% raw %}}}{% endraw %}"
|
||||||
remote_src: True
|
remote_src: True
|
||||||
when: {{ cookiecutter.app_name }}_force_reinstall or {{ cookiecutter.app_name }}_check is failed or {{ cookiecutter.app_name }}_version not in {{ cookiecutter.app_name }}_check.stderr
|
when: {{ cookiecutter.app_name }}_force_reinstall or {{ cookiecutter.app_name }}_check is failed or {{ cookiecutter.app_name }}_version not in {{ cookiecutter.app_name }}_check.stderr
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
|
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Copy binary
|
- name: {{ cookiecutter.app_name | upper }} | Copy binary
|
||||||
copy:
|
copy:
|
||||||
@@ -65,6 +80,8 @@
|
|||||||
remote_src: True
|
remote_src: True
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: {{ cookiecutter.app_name }}_force_reinstall or {{ cookiecutter.app_name }}_check is failed or {{ cookiecutter.app_name }}_version not in {{ cookiecutter.app_name }}_check.stderr
|
when: {{ cookiecutter.app_name }}_force_reinstall or {{ cookiecutter.app_name }}_check is failed or {{ cookiecutter.app_name }}_version not in {{ cookiecutter.app_name }}_check.stderr
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
|
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Link binary
|
- name: {{ cookiecutter.app_name | upper }} | Link binary
|
||||||
file:
|
file:
|
||||||
@@ -72,3 +89,5 @@
|
|||||||
dest: "/usr/bin/{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_exec_name {% raw %}}}{% endraw %}"
|
dest: "/usr/bin/{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_exec_name {% raw %}}}{% endraw %}"
|
||||||
state: link
|
state: link
|
||||||
when: {{ cookiecutter.app_name }}_force_reinstall or {{ cookiecutter.app_name }}_check is failed or {{ cookiecutter.app_name }}_version not in {{ cookiecutter.app_name }}_check.stderr
|
when: {{ cookiecutter.app_name }}_force_reinstall or {{ cookiecutter.app_name }}_check is failed or {{ cookiecutter.app_name }}_version not in {{ cookiecutter.app_name }}_check.stderr
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_install
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart {{ cookiecutter.app_name }}
|
notify: restart {{ cookiecutter.app_name }}
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_service
|
||||||
|
|
||||||
- name: {{ cookiecutter.app_name | upper }} | Configuring service
|
- name: {{ cookiecutter.app_name | upper }} | Configuring service
|
||||||
systemd:
|
systemd:
|
||||||
@@ -15,3 +17,5 @@
|
|||||||
state: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_service_state {% raw %}}}{% endraw %}"
|
state: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_service_state {% raw %}}}{% endraw %}"
|
||||||
enabled: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_service_enabled {% raw %}}}{% endraw %}"
|
enabled: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_service_enabled {% raw %}}}{% endraw %}"
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
tags:
|
||||||
|
- {{ cookiecutter.app_name }}_service
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
*.yml linguist-detectable=true
|
||||||
|
*.yaml linguist-detectable=true
|
||||||
|
*.html linguist-detectable=false
|
||||||
@@ -17,3 +17,9 @@ script:
|
|||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||||
|
email:
|
||||||
|
if: branch = main
|
||||||
|
on_success: change
|
||||||
|
on_failure: always
|
||||||
|
recipients:
|
||||||
|
- desarrollo.benders@idealista.com
|
||||||
|
|||||||
Reference in New Issue
Block a user