diff options
Diffstat (limited to 'roles/common')
-rw-r--r-- | roles/common/tasks/main.yml | 16 |
1 files changed, 14 insertions, 2 deletions
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 }}" |