aboutsummaryrefslogtreecommitdiffstats
path: root/roles/common/tasks/main.yml
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-11-15 17:26:32 +0100
committerbinary <me@rgoncalves.se>2020-11-15 17:26:32 +0100
commitaea6b114e050545ccc8b953c579d53c9158e238b (patch)
tree7cbeb2ad790638e433c21f1452dded1588949d2e /roles/common/tasks/main.yml
parent5bcecbf08db7013ba4de12e492961e2cba6e6b8a (diff)
downloadinfrastructure-aea6b114e050545ccc8b953c579d53c9158e238b.tar.gz
I'm so lazy so ignore this cimment this time pls
Diffstat (limited to 'roles/common/tasks/main.yml')
-rw-r--r--roles/common/tasks/main.yml35
1 files changed, 12 insertions, 23 deletions
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index acbcb1c..1bc657f 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -3,38 +3,30 @@
---
-- 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 }}"
+- name: Check installation of packages
package:
name: "{{ item }}"
state: present
+ loop: "{{ common_packages +lookup('vars', 'common_packages_' + ansible_distribution | lower) }}"
+ ignore_errors: true
+- name: Check existence of primary directory
+ file:
+ path: /data/{{ item }}
+ state: directory
loop:
- - "{{ packages.zsh }}"
- - "{{ packages.curl }}"
- - "{{ packages.tmux }}"
- - "{{ packages.wget }}"
- - "{{ packages.figlet }}"
- - "{{ packages.neovim }}"
- - "{{ packages.pip }}"
- - util-linux
- - shadow
+ - git
- ignore_errors: yes
+- include: "init_{{ ansible_distribution | lower }}.yml"
+ ignore_errors: true
- name: Copy zshrc configuration file
copy:
src: zshrc
dest: "{{ path_zshrc }}"
owner: root
- group: "{{ group.root }}"
+ group: "{{ group_root }}"
mode: 0644
- name: Copy tmux configuration file
@@ -42,7 +34,7 @@
src: tmux.conf
dest: /etc/tmux.conf
owner: root
- group: "{{ group.root }}"
+ group: "{{ group_root }}"
mode: 0644
- name: Synchronize host hostname with config hostname
@@ -53,9 +45,6 @@
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 }}"
remember that computers suck.