summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorNikolaos Boutalas <nikolaos@boutalas.me>2024-01-05 03:50:50 +0200
committerNikolaos Boutalas <nikolaos@boutalas.me>2024-03-17 11:48:24 +0200
commit7217241c87516875cc6f882a9125403b97bf3e06 (patch)
tree3ddfc0e0d85d41fe141b87c099f82f676bfac545 /tasks
parent77475705a59c9c347e8face58cf17b051f84f63e (diff)
Minor changesHEADmaster
Diffstat (limited to 'tasks')
-rw-r--r--tasks/dependencies.yml13
-rw-r--r--tasks/dependencies/all.yml20
-rw-r--r--tasks/dependencies/fedora.yml6
-rw-r--r--tasks/dependencies/ubuntu.yml6
-rw-r--r--tasks/node.yml29
-rw-r--r--tasks/sdkman.yml20
-rw-r--r--tasks/ssh.yml9
-rw-r--r--tasks/tmux.yml7
-rw-r--r--tasks/zsh.yml52
9 files changed, 14 insertions, 148 deletions
diff --git a/tasks/dependencies.yml b/tasks/dependencies.yml
new file mode 100644
index 0000000..baba4a2
--- /dev/null
+++ b/tasks/dependencies.yml
@@ -0,0 +1,13 @@
+- name: Update Aptitude
+ become: true
+ ansible.builtin.apt:
+ update_cache: true
+ tags:
+ - dependencies
+
+- name: Install dependencies
+ become: true
+ ansible.builtin.package:
+ name: [curl, git, docker, fzf, tmux, stow, unzip, zip, neovim, zsh, ripgrep]
+ tags:
+ - dependencies
diff --git a/tasks/dependencies/all.yml b/tasks/dependencies/all.yml
deleted file mode 100644
index aa05885..0000000
--- a/tasks/dependencies/all.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-- name: Install Ubuntu dependencies
- ansible.builtin.import_tasks:
- file: tasks/dependencies/ubuntu.yml
- when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- tags:
- - always
-
-- name: Install Fedora dependencies
- ansible.builtin.import_tasks:
- file: tasks/dependencies/fedora.yml
- when: ansible_distribution == 'Fedora'
- tags:
- - always
-
-- name: Install dependencies
- become: true
- ansible.builtin.package:
- name: [curl, git, zsh, docker, fzf, tmux, stow, unzip, zip]
- tags:
- - always
diff --git a/tasks/dependencies/fedora.yml b/tasks/dependencies/fedora.yml
deleted file mode 100644
index df554c6..0000000
--- a/tasks/dependencies/fedora.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-- name: Install which
- become: true
- ansible.builtin.package:
- name: which
- tags:
- - always
diff --git a/tasks/dependencies/ubuntu.yml b/tasks/dependencies/ubuntu.yml
deleted file mode 100644
index 742fda3..0000000
--- a/tasks/dependencies/ubuntu.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-- name: Update Aptitude
- become: true
- ansible.builtin.apt:
- update_cache: true
- tags:
- - always
diff --git a/tasks/node.yml b/tasks/node.yml
index 9699e22..5ca660b 100644
--- a/tasks/node.yml
+++ b/tasks/node.yml
@@ -11,32 +11,3 @@
changed_when: true
tags:
- node
-
-- name: Enable nvm
- ansible.builtin.lineinfile:
- path: "~/.config/zsh/.zshrc"
- line: |
- export NVM_DIR=~/.nvm
- [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
- autoload -U add-zsh-hook
- load-nvmrc() {
- local node_version="$(nvm version)"
- local nvmrc_path="$(nvm_find_nvmrc)"
-
- if [ -n "$nvmrc_path" ]; then
- local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
-
- if [ "$nvmrc_node_version" = "N/A" ]; then
- nvm install
- elif [ "$nvmrc_node_version" != "$node_version" ]; then
- nvm use
- fi
- elif [ "$node_version" != "$(nvm version default)" ]; then
- echo "Reverting to nvm default version"
- nvm use default
- fi
- }
- add-zsh-hook chpwd load-nvmrc
- load-nvmrc
- tags:
- - node
diff --git a/tasks/sdkman.yml b/tasks/sdkman.yml
index e87a4c0..42186b7 100644
--- a/tasks/sdkman.yml
+++ b/tasks/sdkman.yml
@@ -1,6 +1,6 @@
- name: Fetch sdkman installation script
ansible.builtin.get_url:
- url: https://get.sdkman.io?rcupdate=false
+ url: https://get.sdkman.io
dest: /tmp/sdkman_install.sh
mode: '0755'
tags:
@@ -11,21 +11,3 @@
changed_when: true
tags:
- sdkman
-
-- name: Enable sdkman
- ansible.builtin.lineinfile:
- path: "~/.config/zsh/.zshrc"
- line: |
- #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
- export SDKMAN_DIR="$HOME/.sdkman"
- [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
- tags:
- - sdkman
-
-- name: Configure sdkman_auto_env
- ansible.builtin.lineinfile:
- path: "~/.sdkman/etc/config"
- regexp: '^sdkman_auto_env='
- line: sdkman_auto_env=true
- tags:
- - sdkman
diff --git a/tasks/ssh.yml b/tasks/ssh.yml
deleted file mode 100644
index af4f923..0000000
--- a/tasks/ssh.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-- name: Copy SSH keys
- ansible.builtin.copy:
- src: ./ssh/
- dest: ~/.ssh
- owner: "{{ ansible_user_id }}"
- group: "{{ ansible_user_id }}"
- mode: '0600'
- tags:
- - ssh
diff --git a/tasks/tmux.yml b/tasks/tmux.yml
deleted file mode 100644
index 8863d64..0000000
--- a/tasks/tmux.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: Install tmux plugin manager
- ansible.builtin.git:
- repo: 'https://github.com/tmux-plugins/tpm'
- dest: "~/.tmux/plugins/tpm"
- version: master
- tags:
- - tmux
diff --git a/tasks/zsh.yml b/tasks/zsh.yml
deleted file mode 100644
index 5301496..0000000
--- a/tasks/zsh.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-- name: Change default shell
- become: true
- ansible.builtin.shell: "usermod -s $(which zsh) {{ ansible_user_id }}"
- changed_when: true
- tags:
- - zsh
-
-- name: Create .zshenv
- ansible.builtin.shell: "echo \"ZDOTDIR=~/.config/zsh\" > ~/.zshenv"
- changed_when: true
- tags:
- - zsh
-
-- name: Install Oh My Zsh
- ansible.builtin.shell: zsh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- changed_when: true
- tags:
- - zsh
-
-- name: Install zsh-autosuggestions plugin
- ansible.builtin.git:
- repo: 'https://github.com/zsh-users/zsh-autosuggestions.git'
- dest: "~/.config/zsh/ohmyzsh/plugins/zsh-autosuggestions"
- version: master
- tags:
- - zsh
-
-- name: Install zsh-syntax-highlighting plugin
- ansible.builtin.git:
- repo: 'https://github.com/zsh-users/zsh-syntax-highlighting.git'
- dest: "~/.config/zsh/ohmyzsh/plugins/zsh-syntax-highlighting"
- version: master
- tags:
- - zsh
-
-- name: Enable ZSH plugins
- ansible.builtin.lineinfile:
- path: "~/.config/zsh/.zshrc"
- regexp: '^plugins='
- line: plugins=(git tmux zsh-autosuggestions zsh-syntax-highlighting)
- tags:
- - zsh
-
-- name: Enable tmux autostart
- ansible.builtin.lineinfile:
- path: "~/.config/zsh/.zshrc"
- line: |
- if [[ -z $TMUX ]]; then
- tmux -u attach || exec tmux -u new-session && exit
- fi
- tags:
- - zsh