From bc58c7f37ee2bd1bc341cb95f849af746811754f Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 12 Dec 2019 22:30:05 +0100 Subject: trial support openbsd in sshd and zsh roles --- roles/zsh/tasks/main.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'roles/zsh/tasks/main.yml') 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 -- cgit v1.2.3