mirror of
https://github.com/idealista/cookiecutter-ansible-role.git
synced 2024-11-23 19:07:00 +01:00
commit
ef1609d3df
@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch
|
|||||||
- *[#16](https://github.com/idealista/cookiecutter-ansible-role/issues/16) Remove debian jessie support* @pablogcaldito
|
- *[#16](https://github.com/idealista/cookiecutter-ansible-role/issues/16) Remove debian jessie support* @pablogcaldito
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- *[#15](https://github.com/idealista/cookiecutter-ansible-role/issues/15) Add pipenv wrapper* @pablogcaldito
|
||||||
- * Add boilerplate README.md* @vicsufer
|
- * 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)
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -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()
|
||||||
|
5
test.sh
5
test.sh
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user