blob: 12eac8c4e6636fd502c355781d6193a2eb667ce3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
---
- name: install zsh packages
apt:
name: "{{ item }}"
state: present
with_items:
- zsh
- name: install zsh-config
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- { src: "zshrc", dest: "/etc/zsh/zshrc" }
- { src: "zshrc.skel", dest: "/etc/skel/.zshrc" }
- name: set zsh as default shell
user:
name: "{{ item }}"
shell: /bin/zsh
with_items: "{{ [ 'root' ] | union(zsh_loginshell_user | default([])) }}"
- name: make zsh the default shell for useradd
lineinfile:
regexp: '^#?SHELL='
line: 'SHELL=/bin/zsh'
path: /etc/default/useradd
- name: make zsh the default shell for adduser
lineinfile:
regexp: '^#?DSHELL='
line: 'DSHELL=/bin/zsh'
path: /etc/adduser.conf
|