commit
0b22e75775
@ -9,7 +9,6 @@ install:
|
||||
- pip3 install cookiecutter
|
||||
env:
|
||||
jobs:
|
||||
- MOLECULE_DISTRO=debian:jessie-slim
|
||||
- MOLECULE_DISTRO=debian:stretch-slim
|
||||
- MOLECULE_DISTRO=debian:buster-slim
|
||||
|
||||
|
@ -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).
|
||||
|
||||
## 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)
|
||||
## [Full Changelog](https://github.com/idealista/cookiecutter-ansible-role/compare/1.0.0...1.0.1)
|
||||
### Removed
|
||||
|
10
README.md
10
README.md
@ -27,13 +27,11 @@ This cookiecutter:
|
||||
|
||||
### Prerequisities
|
||||
|
||||
Cookiecutter version 1.7.x installed.
|
||||
|
||||
You can satify this requirement with ```pip install cookiecutter```
|
||||
You just need to have [pipenv](https://github.com/pypa/pipenv) installed.
|
||||
|
||||
## 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.
|
||||
|
||||
@ -56,10 +54,6 @@ license [Apache 2.0]:
|
||||
galaxy_tag_1 [example_tag1]: github_cli
|
||||
galaxy_tag_2 [example_tag2]: github
|
||||
galaxy_tag_3 [example_tag3]: cli
|
||||
Select debian_jessie_support:
|
||||
1 - True
|
||||
2 - False
|
||||
Choose from 1, 2 [1]:
|
||||
Select debian_stretch_support:
|
||||
1 - True
|
||||
2 - False
|
||||
|
@ -15,7 +15,6 @@
|
||||
"galaxy_tag_1":"example_tag1",
|
||||
"galaxy_tag_2":"example_tag2",
|
||||
"galaxy_tag_3":"example_tag3",
|
||||
"debian_jessie_support":["True", "False"],
|
||||
"debian_stretch_support":["True", "False"],
|
||||
"debian_buster_support":["True", "False"],
|
||||
"has_service":["True", "False"],
|
||||
|
@ -36,7 +36,7 @@ def configureRole():
|
||||
os.remove("files/.empty")
|
||||
|
||||
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():
|
||||
checkInput()
|
||||
|
5
test.sh
5
test.sh
@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
# 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
|
||||
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/exampleapplication/gh/g' defaults/main.yml
|
||||
# Launch molecule tests
|
||||
pipenv sync
|
||||
pipenv install -r test-requirements.txt --three
|
||||
pipenv run molecule test
|
||||
|
||||
)
|
||||
# Cleanup
|
||||
rm -rf github_cli_role
|
||||
|
@ -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
|
@ -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).
|
||||
|
||||
@ -26,7 +28,7 @@ These instructions will get you a copy of the role for your Ansible playbook. On
|
||||
|
||||
### Prerequisities
|
||||
|
||||
Ansible 2.8.x.x version installed.
|
||||
Ansible {{ cookiecutter.ansible_version }} version installed.
|
||||
|
||||
Molecule 3.x.x version installed.
|
||||
|
||||
@ -86,7 +88,7 @@ $ pipenv run molecule test
|
||||
|
||||
## 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.
|
||||
|
||||
@ -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)
|
||||
|
||||
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
|
||||
|
||||
|
@ -13,6 +13,5 @@ galaxy_info:
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
{% if cookiecutter.debian_jessie_support == 'True' %}- jessie{% endif %}
|
||||
{% if cookiecutter.debian_stretch_support == 'True' %}- stretch{% endif %}
|
||||
{% if cookiecutter.debian_buster_support == 'True' %}- buster{% endif %}
|
||||
|
@ -10,7 +10,6 @@ install:
|
||||
- pipenv sync
|
||||
env:
|
||||
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_buster_support == 'True' %}- MOLECULE_DISTRO=debian:buster-slim{% endif %}
|
||||
script:
|
||||
|
Loading…
Reference in New Issue
Block a user