From 28fe4678d7bf6686eed6c036c9e21888f8b2d23f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20P=C3=A9rez=20Garc=C3=ADa?= Date: Mon, 14 Jun 2021 17:21:16 +0200 Subject: [PATCH] resolve #76 create shell user variable --- CHANGELOG.md | 2 ++ {{cookiecutter.app_name}}_role/defaults/main.yml | 1 + {{cookiecutter.app_name}}_role/tasks/install.yml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) 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