From 67c0e448276e46fafd47db73dfc0031786a18dc0 Mon Sep 17 00:00:00 2001 From: binary Date: Mon, 2 Nov 2020 13:20:53 +0100 Subject: Refactor utils and hostname to common role --- roles/setup_utils/files/tmux.conf | 24 -------------- roles/setup_utils/files/zshrc | 30 ----------------- roles/setup_utils/tasks/main.yml | 70 --------------------------------------- 3 files changed, 124 deletions(-) delete mode 100644 roles/setup_utils/files/tmux.conf delete mode 100644 roles/setup_utils/files/zshrc delete mode 100644 roles/setup_utils/tasks/main.yml (limited to 'roles/setup_utils') diff --git a/roles/setup_utils/files/tmux.conf b/roles/setup_utils/files/tmux.conf deleted file mode 100644 index 2816065..0000000 --- a/roles/setup_utils/files/tmux.conf +++ /dev/null @@ -1,24 +0,0 @@ -# /etc/tmux.conf ~~ rgoncalves.se infrastructure - -# keybinds -unbind C-b -set -g prefix ` -bind-key n last-window -bind-key m send-prefix -bind-key ` last-window -bind-key e send-prefix - -# options -set -sg escape-time 0 -set -g mouse off -set -g default-terminal "screen-256color" -set -g status-right-length 50 -set -g status-left-length 20 -set-option -g history-limit 5000 -setw -g mode-keys vi - -# statusbar -set -g status-position bottom -set -g status-bg colour255 -set -g status-fg colour235 - diff --git a/roles/setup_utils/files/zshrc b/roles/setup_utils/files/zshrc deleted file mode 100644 index 7635057..0000000 --- a/roles/setup_utils/files/zshrc +++ /dev/null @@ -1,30 +0,0 @@ -# /etc/zshrc configuration ~~ rgoncalves.se infrastructure - -# export environment variables -export TERM=xterm-256color -export LANG=en_US.UTF-8 - -# zsh options -CASE_SENSITIVE="false" - -# autocomplete -autoload -U history-search-end -zle -N history-beginning-search-backward-end history-search-end -zle -N history-beginning-search-forward-end history-search-end -bindkey "^[[A" history-beginning-search-backward-end -bindkey "^[[B" history-beginning-search-forward-end -bindkey "^[[1;5C" forward-word -bindkey "^[[1;5D" backward-word -bindkey "\e[3~" delete-char -bindkey '^[[Z' reverse-menu-complete - -zstyle ':completion:*' completer _complete -zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|=* r:|=*' -autoload -Uz compinit -compinit -u - -# aliases -alias cdd="cd .." - -# prompt -PROMPT="%B %n@%m %~ %# %b" 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 }}" -- cgit v1.2.3