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 +++++++++++--------- roles/zsh/templates/banner.chaos-at-home.j2 | 2 +- roles/zsh/templates/banner.elevate.j2 | 2 +- roles/zsh/templates/banner.skillz.j2 | 2 +- roles/zsh/templates/banner.spreadspace.j2 | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) (limited to 'roles/zsh') 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 diff --git a/roles/zsh/templates/banner.chaos-at-home.j2 b/roles/zsh/templates/banner.chaos-at-home.j2 index 74762bbe..e9b6baa9 100644 --- a/roles/zsh/templates/banner.chaos-at-home.j2 +++ b/roles/zsh/templates/banner.chaos-at-home.j2 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ksh echo -e "" echo -e " \033[0;37m █████╗██╗ ██╗ ████╗ █████╗ ██████╗\033[1;30m ██████╗ \033[0;37m██╗ ██╗ █████╗ ███╗ ███╗█████╗\033[0m" diff --git a/roles/zsh/templates/banner.elevate.j2 b/roles/zsh/templates/banner.elevate.j2 index d2c9b907..cca0850d 100644 --- a/roles/zsh/templates/banner.elevate.j2 +++ b/roles/zsh/templates/banner.elevate.j2 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ksh echo -e "" echo -e " \033[1;37m██████████ ██ ██████████ ▜█▙ ▟█▛ ▟██▙ ██████████ ██████████\033[0m" diff --git a/roles/zsh/templates/banner.skillz.j2 b/roles/zsh/templates/banner.skillz.j2 index 8492c918..f750f9e6 100644 --- a/roles/zsh/templates/banner.skillz.j2 +++ b/roles/zsh/templates/banner.skillz.j2 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ksh echo -e "" echo -e " \033[1;35m███████╗██╗ ██╗██╗██╗ ██╗ ███████╗\033[0;35m ██████╗ ██╗███████╗\033[0m" diff --git a/roles/zsh/templates/banner.spreadspace.j2 b/roles/zsh/templates/banner.spreadspace.j2 index ec59509f..580aa4c8 100644 --- a/roles/zsh/templates/banner.spreadspace.j2 +++ b/roles/zsh/templates/banner.spreadspace.j2 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ksh echo -e "" echo -e " \033[0;33m█████╗█████╗ █████╗ █████╗ ████╗ █████╗ █████╗█████╗ ████╗ ████╗█████╗\033[0m" -- cgit v1.2.3