aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/common/files/tmux.conf (renamed from roles/setup_utils/files/tmux.conf)0
-rw-r--r--roles/common/files/zshrc (renamed from roles/setup_utils/files/zshrc)0
-rw-r--r--roles/common/tasks/main.yml52
-rw-r--r--roles/setup_git/tasks/main.yml10
-rw-r--r--roles/setup_hostname/tasks/main.yml14
-rw-r--r--roles/setup_utils/tasks/main.yml70
6 files changed, 53 insertions, 93 deletions
diff --git a/roles/setup_utils/files/tmux.conf b/roles/common/files/tmux.conf
index 2816065..2816065 100644
--- a/roles/setup_utils/files/tmux.conf
+++ b/roles/common/files/tmux.conf
diff --git a/roles/setup_utils/files/zshrc b/roles/common/files/zshrc
index 7635057..7635057 100644
--- a/roles/setup_utils/files/zshrc
+++ b/roles/common/files/zshrc
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
new file mode 100644
index 0000000..7dbc5dd
--- /dev/null
+++ b/roles/common/tasks/main.yml
@@ -0,0 +1,52 @@
+
+# common ~~ tasks/main.yml
+
+---
+
+- name: Check installation of package "{{ item }}"
+ become: yes
+
+ package:
+ name: "{{ item }}"
+ state: present
+
+ loop:
+ - "{{ packages.zsh }}"
+ - "{{ packages.curl }}"
+ - "{{ packages.tmux }}"
+ - "{{ packages.wget }}"
+ - "{{ packages.figlet }}"
+ - "{{ packages.neovim }}"
+
+ 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: Synchronize host hostname with config hostname
+ hostname:
+ name: "{{ inventory_hostname }}"
+
+- 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: "{{ path_zsh_bin }}"
+ loop: "{{ valid_users_shell.stdout_lines }}"
diff --git a/roles/setup_git/tasks/main.yml b/roles/setup_git/tasks/main.yml
index b2b2d73..655e81a 100644
--- a/roles/setup_git/tasks/main.yml
+++ b/roles/setup_git/tasks/main.yml
@@ -1,13 +1,5 @@
-# =========================================================================== #
-# __ _ __
-# _________ / /__ ____ _(_) /_
-# / ___/ __ \/ / _ \ / __ `/ / __/
-# / / / /_/ / / __/ / /_/ / / /_
-# /_/ \____/_/\___(_) \__, /_/\__/
-# /____/
-#
-# =========================================================================== #
+# roles ~~ setup_git
---
- name: Check installation of git
diff --git a/roles/setup_hostname/tasks/main.yml b/roles/setup_hostname/tasks/main.yml
deleted file mode 100644
index d0e9e62..0000000
--- a/roles/setup_hostname/tasks/main.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# =========================================================================== #
-# __ __ __
-# _________ / /__ / /_ ____ _____/ /_____ ____ _____ ___ ___
-# / ___/ __ \/ / _ \ / __ \/ __ \/ ___/ __/ __ \/ __ `/ __ `__ \/ _ \
-# / / / /_/ / / __/ / / / / /_/ (__ ) /_/ / / / /_/ / / / / / / __/
-# /_/ \____/_/\___(_) /_/ /_/\____/____/\__/_/ /_/\__,_/_/ /_/ /_/\___/
-#
-# =========================================================================== #
-
----
-- name: Synchronize host hostname with config hostname
- hostname:
- name: "{{ inventory_hostname }}"
diff --git a/roles/setup_utils/tasks/main.yml b/roles/setup_utils/tasks/main.yml
deleted file mode 100644
index 300bef6..0000000
--- a/roles/setup_utils/tasks/main.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-
-# =========================================================================== #
-# __ __ _ __
-# _________ / /__ __ __/ /_(_) /____
-# / ___/ __ \/ / _ \ / / / / __/ / / ___/
-# / / / /_/ / / __/ / /_/ / /_/ / (__ )
-# /_/ \____/_/\___(_) \__,_/\__/_/_/____/
-#
-# =========================================================================== #
-
----
-- name: Check installation of "{{ package_zsh }}"
- package:
- name: "{{ package_zsh }}"
- state: present
-
-- name: Check installation of "{{ package_neovim }}"
- package:
- name: "{{ package_neovim }}"
- state: present
-
-- name: Check installation of "{{ package_tmux }}"
- package:
- name: "{{ package_tmux }}"
- state: present
- ignore_errors: yes
-
-- name: Check installation of "{{ package_curl }}"
- package:
- name: "{{ package_curl }}"
- state: present
- ignore_errors: yes
-
-- name: Check installation of "{{ package_wget }}"
- package:
- name: "{{ package_wget }}"
- state: present
- ignore_errors: yes
-
-- name: Check installation of figlet
- package:
- name: figlet
- 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: "{{ path_zsh_bin }}"
- loop: "{{ valid_users_shell.stdout_lines }}"
remember that computers suck.