diff --git a/CHANGELOG.md b/CHANGELOG.md index c04c7c2..55b1269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch - *[#4](https://github.com/idealista/cookiecutter-ansible-role/issues/4) Upgrade to Goss v0.3.11* @pablogcaldito ### Fixed +- *[#11](https://github.com/idealista/cookiecutter-ansible-role/issues/11) Fix parameterization of PrivateTmp* @pablogcaldito - *[#7](https://github.com/idealista/cookiecutter-ansible-role/issues/7) Fix bug in in the check version task in install.yml* @pablogcaldito - *[#3](https://github.com/idealista/cookiecutter-ansible-role/issues/3) Fix typo in both contributing files* @pablogcaldito diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 45cac30..7748edf 100755 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -22,6 +22,7 @@ def configureRole(): # Delete the service and things that reference the service os.remove("tasks/service.yml") os.remove("templates/{{ cookiecutter.app_name }}.service.j2") + shutil.rmtree("molecule/default/group_vars") # Remove or not the handlers folder if not {{ cookiecutter.has_handlers }}: shutil.rmtree("handlers") diff --git a/{{cookiecutter.app_name}}_role/defaults/main.yml b/{{cookiecutter.app_name}}_role/defaults/main.yml index ecd33ef..b483174 100644 --- a/{{cookiecutter.app_name}}_role/defaults/main.yml +++ b/{{cookiecutter.app_name}}_role/defaults/main.yml @@ -56,5 +56,5 @@ - "flag1 {% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_flag1_value {% raw %}}}{% endraw %}" - "flag2 {% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_flag2_value {% raw %}}}{% endraw %}" -private_tmp_service: yes +{{ cookiecutter.app_name }}_private_tmp: true {% endif %} \ No newline at end of file diff --git a/{{cookiecutter.app_name}}_role/molecule/default/group_vars/all.yml b/{{cookiecutter.app_name}}_role/molecule/default/group_vars/all.yml new file mode 100644 index 0000000..9739ddb --- /dev/null +++ b/{{cookiecutter.app_name}}_role/molecule/default/group_vars/all.yml @@ -0,0 +1,3 @@ +--- + +{{ cookiecutter.app_name }}_private_tmp: false diff --git a/{{cookiecutter.app_name}}_role/templates/{{ cookiecutter.app_name }}.service.j2 b/{{cookiecutter.app_name}}_role/templates/{{ cookiecutter.app_name }}.service.j2 index 066f354..79cad12 100644 --- a/{{cookiecutter.app_name}}_role/templates/{{ cookiecutter.app_name }}.service.j2 +++ b/{{cookiecutter.app_name}}_role/templates/{{ cookiecutter.app_name }}.service.j2 @@ -6,7 +6,7 @@ Requires=network-online.target After=network-online.target [Service] -PrivateTmp={% raw %}{{ private_tmp_service }}{% endraw %} +PrivateTmp={% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_private_tmp {% raw %}}}{% endraw %} User={% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_user {% raw %}}}{% endraw %} Group={% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %} RuntimeDirectory={{ cookiecutter.app_name }}