diff options
author | binary <me@rgoncalves.se> | 2020-11-12 14:29:49 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2020-11-12 14:29:49 +0100 |
commit | b419094cda74405eb4cbb8b7031b53cd2f347566 (patch) | |
tree | e3e6de54517612ebc96a6d3804848637562103a4 /roles/common | |
parent | 9007e995ed14f92af8fe57fbe9ced0047d2a5634 (diff) | |
download | infrastructure-b419094cda74405eb4cbb8b7031b53cd2f347566.tar.gz |
Refactor and cleanup old roles
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 }}" |