summaryrefslogtreecommitdiff
path: root/roles/zsh/tasks/main.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-12-12 22:30:05 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-12-23 02:00:23 +0100
commitbc58c7f37ee2bd1bc341cb95f849af746811754f (patch)
tree70495e39df840cc97720af331fd9d43e3460b884 /roles/zsh/tasks/main.yml
parentfix network config of atlas based vms (diff)
trial support openbsd in sshd and zsh roles
Diffstat (limited to 'roles/zsh/tasks/main.yml')
-rw-r--r--roles/zsh/tasks/main.yml20
1 files changed, 11 insertions, 9 deletions
diff --git a/roles/zsh/tasks/main.yml b/roles/zsh/tasks/main.yml
index 80880f83..f0aa696e 100644
--- a/roles/zsh/tasks/main.yml
+++ b/roles/zsh/tasks/main.yml
@@ -1,13 +1,13 @@
---
- name: install zsh packages
- apt:
+ openbsd_pkg:
name: zsh
state: present
- name: install zsh-config
loop:
- src: "zshrc"
- dest: "/etc/zsh/zshrc"
+ dest: "/etc/zshrc"
- src: "zshrc.skel"
dest: "/etc/skel/.zshrc"
loop_control:
@@ -20,19 +20,20 @@
loop: "{{ [ 'root' ] | union(zsh_loginshell_user | default([])) }}"
user:
name: "{{ item }}"
- shell: /bin/zsh
+ shell: /usr/local/bin/zsh
- name: make zsh the default shell for useradd
lineinfile:
- regexp: '^#?SHELL='
- line: 'SHELL=/bin/zsh'
- path: /etc/default/useradd
+ regexp: '^#?shell\s'
+ line: 'shell /usr/local/bin/zsh'
+ path: /etc/usermgmt.conf
- name: make zsh the default shell for adduser
lineinfile:
- regexp: '^#?DSHELL='
- line: 'DSHELL=/bin/zsh'
+ regexp: '^#?defaultshell='
+ line: 'defaultshell=/usr/local/bin/zsh'
path: /etc/adduser.conf
+ create: yes
- name: install shell banner
when: zsh_banner is defined
@@ -46,6 +47,7 @@
- name: enable banner for zsh login
lineinfile:
- path: /etc/zsh/zlogin
+ path: /etc/zlogin
line: /etc/banner.sh
insertbefore: "^## END OF FILE #"
+ create: yes