aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/setup.yaml
diff options
context:
space:
mode:
authorEugene Triguba <eugene@desktop.midcoip.net>2022-05-08 09:34:19 -0500
committerEugene Triguba <eugene@desktop.midcoip.net>2022-05-08 09:34:19 -0500
commit53205809e426d06eee009f4415798c9dd068807c (patch)
treec1a3055c0a0adc23ea0d01cd5fbc7d4307e080ba /ansible/setup.yaml
downloaddotfiles-53205809e426d06eee009f4415798c9dd068807c.zip
Initial Commit
Diffstat (limited to 'ansible/setup.yaml')
-rw-r--r--ansible/setup.yaml46
1 files changed, 46 insertions, 0 deletions
diff --git a/ansible/setup.yaml b/ansible/setup.yaml
new file mode 100644
index 0000000..e05cd10
--- /dev/null
+++ b/ansible/setup.yaml
@@ -0,0 +1,46 @@
+---
+- name: Playbook to manage personal dotfiles
+ hosts: localhost
+ connection: local
+ tasks:
+ - name: Create folders
+ file:
+ path: "{{item}}"
+ state: directory
+ loop:
+ - "$HOME/.config/i3"
+ - "$HOME/.config/alacritty"
+ - "$HOME/.config/nvim/autoload"
+ - "$HOME/src"
+ - "$HOME/bin"
+
+ - include_tasks: tasks/link_dotfiles.yaml
+ tags:
+ - links
+
+ - include_tasks: tasks/packages.yaml
+ tags:
+ - packages
+
+ - include_tasks: tasks/desktop.yaml
+ tags:
+ - desktop
+
+ - name: Ensure shell is set to zsh
+ vars:
+ current_user: "{{ ansible_user_id }}"
+ become: yes
+ become_method: su
+ user:
+ name: "{{ current_user }}"
+ shell: /usr/local/bin/zsh
+
+ - name: Install vim-plug
+ command: >
+ wget \
+ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim \
+ -P "$HOME/.config/nvim/autoload"
+
+ - name: Install vim-plug plugins
+ shell: nvim +PlugInstall +qall --headless
+