diff --git a/CHANGELOG.md b/CHANGELOG.md index 52d27e9..0cf6309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ 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 +### Added +- *[#76](https://github.com/idealista/cookiecutter-ansible-role/issues/76) Create shell user variable* @emepege ## [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) diff --git a/{{cookiecutter.app_name}}_role/defaults/main.yml b/{{cookiecutter.app_name}}_role/defaults/main.yml index cc74a3d..6b0bf9b 100644 --- a/{{cookiecutter.app_name}}_role/defaults/main.yml +++ b/{{cookiecutter.app_name}}_role/defaults/main.yml @@ -32,6 +32,7 @@ # Owner {{ cookiecutter.app_name }}_user: exampleuser {{ cookiecutter.app_name }}_group: examplegroup +{{ cookiecutter.app_name }}_user_shell: /usr/sbin/nologin # Maximum number of files limit {{ cookiecutter.app_name }}_max_files: 32768 diff --git a/{{cookiecutter.app_name}}_role/tasks/install.yml b/{{cookiecutter.app_name}}_role/tasks/install.yml index ac991ea..8a60374 100644 --- a/{{cookiecutter.app_name}}_role/tasks/install.yml +++ b/{{cookiecutter.app_name}}_role/tasks/install.yml @@ -13,7 +13,7 @@ name: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_user {% raw %}}}{% endraw %}" group: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_group {% raw %}}}{% endraw %}" system: yes - shell: /usr/sbin/nologin + shell: "{% raw %}{{{% endraw %} {{ cookiecutter.app_name }}_user_shell {% raw %}}}{% endraw %}" createhome: no tags: - {{ cookiecutter.app_name }}_install