From b419094cda74405eb4cbb8b7031b53cd2f347566 Mon Sep 17 00:00:00 2001 From: binary Date: Thu, 12 Nov 2020 14:29:49 +0100 Subject: Refactor and cleanup old roles --- roles/common/tasks/main.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'roles/common/tasks') diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index cc959d9..acbcb1c 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -3,6 +3,13 @@ --- +- name: Setup repositories for Alpine + shell: | + echo "https://mirror.ungleich.ch/mirror/packages/alpine/edge/main/" > /etc/apk/repositories + echo "https://mirror.ungleich.ch/mirror/packages/alpine/edge/community/" >> /etc/apk/repositories + echo "https://mirror.ungleich.ch/mirror/packages/alpine/edge/releases/" >> /etc/apk/repositories + when: "'alpine' in group_names" + - name: Check installation of package "{{ item }}" package: name: "{{ item }}" @@ -16,6 +23,8 @@ - "{{ packages.figlet }}" - "{{ packages.neovim }}" - "{{ packages.pip }}" + - util-linux + - shadow ignore_errors: yes @@ -23,7 +32,7 @@ - name: Copy zshrc configuration file copy: src: zshrc - dest: /etc/zshrc + dest: "{{ path_zshrc }}" owner: root group: "{{ group.root }}" mode: 0644 @@ -41,9 +50,12 @@ name: "{{ inventory_hostname }}" - name: Retrieve all valid users for zsh - shell: awk -F ":" '{ if($3 > 999 && $3 < 16000) { print $1 }}' /etc/passwd + shell: awk -F ":" '{ if($3 == 0 || $3 > 999 && $3 < 16000) { print $1 }}' /etc/passwd register: valid_users_shell +- debug: + var: valid_users_shell.stdout + - name: Change shell for all valid users to zsh user: name: "{{ item }}" -- cgit v1.2.3