Merge pull request #19 from idealista/develop

Release 2.0.0
This commit is contained in:
Pablo Gómez-Caldito Gómez 2020-10-13 12:03:16 +02:00 committed by GitHub
commit 0b22e75775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 39 additions and 19 deletions

View File

@ -9,7 +9,6 @@ install:
- pip3 install cookiecutter - pip3 install cookiecutter
env: env:
jobs: jobs:
- MOLECULE_DISTRO=debian:jessie-slim
- MOLECULE_DISTRO=debian:stretch-slim - MOLECULE_DISTRO=debian:stretch-slim
- MOLECULE_DISTRO=debian:buster-slim - MOLECULE_DISTRO=debian:buster-slim

View File

@ -3,6 +3,15 @@ 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
## [2.0.0](https://github.com/idealista/cookiecutter-ansible-role/tree/2.0.0) (2020-10-13)
## [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/1.0.1...2.0.0)
### Removed
- *[#16](https://github.com/idealista/cookiecutter-ansible-role/issues/16) Remove debian jessie support* @pablogcaldito
### Added
- *[#15](https://github.com/idealista/cookiecutter-ansible-role/issues/15) Add pipenv wrapper* @pablogcaldito
- * Add boilerplate README.md* @vicsufer
## [1.0.1](https://github.com/idealista/cookiecutter-ansible-role/tree/1.0.1) (2020-09-17) ## [1.0.1](https://github.com/idealista/cookiecutter-ansible-role/tree/1.0.1) (2020-09-17)
## [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/1.0.0...1.0.1) ## [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/1.0.0...1.0.1)
### Removed ### Removed

View File

@ -27,13 +27,11 @@ This cookiecutter:
### Prerequisities ### Prerequisities
Cookiecutter version 1.7.x installed. You just need to have [pipenv](https://github.com/pypa/pipenv) installed.
You can satify this requirement with ```pip install cookiecutter```
## Usage ## Usage
To generate your ansible role type ```cookiecutter https://github.com/idealista/cookiecutter-ansible-role```. To generate your ansible role type ```printf "cookiecutter==1.7.2\nJinja2==2.11.2" > requirements.txt && pipenv install -r requirements.txt && pipenv run cookiecutter https://github.com/idealista/cookiecutter-ansible-role && rm Pipfile* requirements.txt```.
Then, introduce some parameters needed for generating it. Then, introduce some parameters needed for generating it.
@ -56,10 +54,6 @@ license [Apache 2.0]:
galaxy_tag_1 [example_tag1]: github_cli galaxy_tag_1 [example_tag1]: github_cli
galaxy_tag_2 [example_tag2]: github galaxy_tag_2 [example_tag2]: github
galaxy_tag_3 [example_tag3]: cli galaxy_tag_3 [example_tag3]: cli
Select debian_jessie_support:
1 - True
2 - False
Choose from 1, 2 [1]:
Select debian_stretch_support: Select debian_stretch_support:
1 - True 1 - True
2 - False 2 - False

View File

@ -15,7 +15,6 @@
"galaxy_tag_1":"example_tag1", "galaxy_tag_1":"example_tag1",
"galaxy_tag_2":"example_tag2", "galaxy_tag_2":"example_tag2",
"galaxy_tag_3":"example_tag3", "galaxy_tag_3":"example_tag3",
"debian_jessie_support":["True", "False"],
"debian_stretch_support":["True", "False"], "debian_stretch_support":["True", "False"],
"debian_buster_support":["True", "False"], "debian_buster_support":["True", "False"],
"has_service":["True", "False"], "has_service":["True", "False"],

View File

@ -36,7 +36,7 @@ def configureRole():
os.remove("files/.empty") os.remove("files/.empty")
def generatePipfile(): def generatePipfile():
os.system("pipenv install -r test-requirements.txt --three") print("Now cd into the role directory and introduce the following command for it to be ready: \"pipenv install -r test-requirements.txt --three\"")
def main(): def main():
checkInput() checkInput()

View File

@ -3,7 +3,7 @@
set -e set -e
# Generate role # Generate role
cookiecutter . --no-input app_name="github_cli" exec_name="gh" author="John Doe" min_ansible_version="2.2" ansible_version="2.8.6" molecule_version="3.0.1" python_docker_version="4.1.0" ansible_lint_version="4.2.0" has_service="False" has_files="False" has_handlers="False" has_templates="False" printf "cookiecutter==1.7.2\nJinja2==2.11.2" > requirements.txt && pipenv install -r requirements.txt && pipenv run cookiecutter . --no-input app_name="github_cli" exec_name="gh" author="John Doe" min_ansible_version="2.2" ansible_version="2.8.6" molecule_version="3.0.1" python_docker_version="4.1.0" ansible_lint_version="4.2.0" has_service="False" has_files="False" has_handlers="False" has_templates="False" && rm Pipfile* requirements.txt
( (
# Adjust the role to test # Adjust the role to test
cd github_cli_role cd github_cli_role
@ -12,8 +12,9 @@ cookiecutter . --no-input app_name="github_cli" exec_name="gh" author="John Doe"
sed -i 's/1.0.0/0.6.4/g' defaults/main.yml sed -i 's/1.0.0/0.6.4/g' defaults/main.yml
sed -i 's/exampleapplication/gh/g' defaults/main.yml sed -i 's/exampleapplication/gh/g' defaults/main.yml
# Launch molecule tests # Launch molecule tests
pipenv sync pipenv install -r test-requirements.txt --three
pipenv run molecule test pipenv run molecule test
) )
# Cleanup # Cleanup
rm -rf github_cli_role rm -rf github_cli_role

View File

@ -0,0 +1,18 @@
# Change Log
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).
## [Unreleased](https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.app_name }}_role/tree/develop)
### Changed
### Added
### Removed
### Fixed
## [X.Y.Z](https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.app_name }}_role/tree/X.Y.Z)
### [Full Changelog](https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.app_name }}_role/compare/1.0.0...X.Y.Z)
### Changed
*[#<issue_number>](https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.app_name }}_role/issues/<issue_number>) \<Change description\>* @\<author\>
## [1.0.0](https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.app_name }}_role/tree/1.0.0)
- Initial release

View File

@ -6,7 +6,9 @@
This ansible role installs [{{ cookiecutter.app_name | replace('_',' ') | title }}](APP_URL_HERE) in a Debian environment. It has been tested for Debian buster and stretch. This ansible role installs [{{ cookiecutter.app_name | replace('_',' ') | title }}](APP_URL_HERE) in a Debian environment. It has been tested for the following Debian versions:
{% if cookiecutter.debian_stretch_support == 'True' %}* Stretch{% endif %}
{% if cookiecutter.debian_buster_support == 'True' %}* Buster{% endif %}
This role has been generated using the [cookiecutter](https://github.com/cookiecutter/cookiecutter) tool, you can generate a similar role that fits your needs using the this [cookiecutter template](https://github.com/idealista/cookiecutter-ansible-role). This role has been generated using the [cookiecutter](https://github.com/cookiecutter/cookiecutter) tool, you can generate a similar role that fits your needs using the this [cookiecutter template](https://github.com/idealista/cookiecutter-ansible-role).
@ -26,7 +28,7 @@ These instructions will get you a copy of the role for your Ansible playbook. On
### Prerequisities ### Prerequisities
Ansible 2.8.x.x version installed. Ansible {{ cookiecutter.ansible_version }} version installed.
Molecule 3.x.x version installed. Molecule 3.x.x version installed.
@ -86,7 +88,7 @@ $ pipenv run molecule test
## Versioning ## Versioning
For the versions available, see the [tags on this repository](https://github.com/idealista/{{ cookiecutter.app_name }}_role/tags). For the versions available, see the [tags on this repository](https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.app_name }}_role/tags).
Additionaly you can see what change in each version in the [CHANGELOG.md](CHANGELOG.md) file. Additionaly you can see what change in each version in the [CHANGELOG.md](CHANGELOG.md) file.
@ -94,7 +96,7 @@ Additionaly you can see what change in each version in the [CHANGELOG.md](CHANGE
* **Idealista** - *Work with* - [idealista](https://github.com/idealista) * **Idealista** - *Work with* - [idealista](https://github.com/idealista)
See also the list of [contributors](https://github.com/idealista/{{ cookiecutter.app_name }}_role/contributors) who participated in this project. See also the list of [contributors](https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.app_name }}_role/contributors) who participated in this project.
## License ## License

View File

@ -13,6 +13,5 @@ galaxy_info:
platforms: platforms:
- name: Debian - name: Debian
versions: versions:
{% if cookiecutter.debian_jessie_support == 'True' %}- jessie{% endif %}
{% if cookiecutter.debian_stretch_support == 'True' %}- stretch{% endif %} {% if cookiecutter.debian_stretch_support == 'True' %}- stretch{% endif %}
{% if cookiecutter.debian_buster_support == 'True' %}- buster{% endif %} {% if cookiecutter.debian_buster_support == 'True' %}- buster{% endif %}

View File

@ -10,7 +10,6 @@ install:
- pipenv sync - pipenv sync
env: env:
jobs: jobs:
{% if cookiecutter.debian_jessie_support == 'True' %}- MOLECULE_DISTRO=debian:jessie-slim{% endif %}
{% if cookiecutter.debian_stretch_support == 'True' %}- MOLECULE_DISTRO=debian:stretch-slim{% endif %} {% if cookiecutter.debian_stretch_support == 'True' %}- MOLECULE_DISTRO=debian:stretch-slim{% endif %}
{% if cookiecutter.debian_buster_support == 'True' %}- MOLECULE_DISTRO=debian:buster-slim{% endif %} {% if cookiecutter.debian_buster_support == 'True' %}- MOLECULE_DISTRO=debian:buster-slim{% endif %}
script: script: