From d9b451020023f89665f109f5a8a88961a88bdfa8 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Fri, 23 Aug 2019 16:22:15 +0200 Subject: [PATCH] account: Added variable for user directory --- roles/account/defaults/main.yml | 2 ++ roles/account/tasks/main.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/account/defaults/main.yml b/roles/account/defaults/main.yml index 14f426f..2859025 100644 --- a/roles/account/defaults/main.yml +++ b/roles/account/defaults/main.yml @@ -1,4 +1,6 @@ --- +user_directory: "/home/{{ username }}" + sudo: no zsh_theme: agnoster diff --git a/roles/account/tasks/main.yml b/roles/account/tasks/main.yml index 53b4b4a..8b5ea65 100644 --- a/roles/account/tasks/main.yml +++ b/roles/account/tasks/main.yml @@ -14,7 +14,7 @@ - name: Configure user account {{ username }} user: name: "{{ username }}" - home: "/home/{{ username }}" + home: "{{ user_directory }}" create_home: yes move_home: yes shell: /bin/zsh @@ -31,7 +31,7 @@ - name: Configure home directory file: - path: "/home/{{ username }}" + path: "{{ user_directory }}" state: directory owner: "{{ username }}" group: "{{ username }}"