tasks for users moved to own file.

This commit is contained in:
Denis Knauf 2021-06-23 16:53:57 +02:00
parent 36705505fb
commit 1bfcf40d73
4 changed files with 12 additions and 11 deletions

View file

@ -15,14 +15,3 @@
template:
src: dotzshrc
dest: "/etc/skel/.zshrc"
- name: 'setup default user(s)'
tags: ohmyzsh
with_items: '{{sys_default_users}}'
user:
name: '{{item.name}}'
home: '{{item.home | default("/home/"+item.name)}}'
shell: '{{item.shell | default("/usr/bin/zsh")}}'
groups: [users]
createhome: yes
move_home: yes
append: yes

View file

@ -164,6 +164,7 @@
- include_tasks: sshd_config.yml
- include_tasks: ohmyzsh.yml
- include_tasks: users.yml
- include_tasks: systemd.yml
- name: update timezone

View file

@ -47,6 +47,7 @@
- include_tasks: sshd_config.yml
- include_tasks: systemd.yml
- include_tasks: ohmyzsh.yml
- include_tasks: users.yml
- name: setup mailname
copy:

10
tasks/users.yml Normal file
View file

@ -0,0 +1,10 @@
- name: 'setup default user(s)'
with_items: '{{sys_default_users}}'
user:
name: '{{item.name}}'
home: '{{item.home | default("/home/"+item.name)}}'
shell: '{{item.shell | default("/usr/bin/zsh")}}'
groups: '{{item.groups | default([users])}}'
createhome: yes
move_home: yes
append: yes