aboutsummaryrefslogtreecommitdiffstats
path: root/roles/setup_utils/tasks
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-08-11 11:26:33 +0200
committerbinary <me@rgoncalves.se>2020-08-11 11:26:33 +0200
commit87a565c0481a58e0d5d8a2a3e33459f1af132ca6 (patch)
tree6c806691ca6d315c75c00df308be2a626e64c461 /roles/setup_utils/tasks
parentd7a8eefeca0ad9cb6e5b6379be92ad4f1c109a72 (diff)
downloadinfrastructure-87a565c0481a58e0d5d8a2a3e33459f1af132ca6.tar.gz
moved dotfiles to utils
Diffstat (limited to 'roles/setup_utils/tasks')
-rw-r--r--roles/setup_utils/tasks/main.yml52
1 files changed, 52 insertions, 0 deletions
diff --git a/roles/setup_utils/tasks/main.yml b/roles/setup_utils/tasks/main.yml
new file mode 100644
index 0000000..446ec46
--- /dev/null
+++ b/roles/setup_utils/tasks/main.yml
@@ -0,0 +1,52 @@
+
+# =========================================================================== #
+# __ __ _ __
+# _________ / /__ __ __/ /_(_) /____
+# / ___/ __ \/ / _ \ / / / / __/ / / ___/
+# / / / /_/ / / __/ / /_/ / /_/ / (__ )
+# /_/ \____/_/\___(_) \__,_/\__/_/_/____/
+#
+# =========================================================================== #
+
+---
+- name: Check installation of zsh
+ package:
+ name: "{{ package_zsh }}"
+ state: present
+
+- name: Check installation of neovim
+ package:
+ name: "{{ package_neovim }}"
+ state: present
+
+- name: Check installation of tmux
+ package:
+ name: "{{ package_tmux }}"
+ state: present
+ ignore_errors: yes
+
+- name: Copy zshrc configuration file
+ copy:
+ src: zshrc
+ dest: /etc/zshrc
+ owner: root
+ group: "{{ group_root }}"
+ mode: 0644
+
+- name: Copy tmux configuration file
+ copy:
+ src: tmux.conf
+ dest: /etc/tmux.conf
+ owner: root
+ group: "{{ group_root }}"
+ mode: 0644
+
+- name: Retrieve all valid users for zsh
+ shell: awk -F ":" '{ if($3 > 999 && $3 < 16000) { print $1 }}' /etc/passwd
+ register: valid_users_shell
+
+- name: Change shell for all valid users to zsh
+ user:
+ name: "{{ item }}"
+ shell: /usr/local/bin/zsh
+ loop: "{{ valid_users_shell.stdout_lines }}"
remember that computers suck.