diff options
author | Aaditya Dhruv <[email protected]> | 2023-09-10 12:01:02 -0500 |
---|---|---|
committer | Aaditya Dhruv <[email protected]> | 2023-09-10 12:01:02 -0500 |
commit | defd4bc9331fca1f9c59906e86221696cea3a832 (patch) | |
tree | 30bd804ea8580e2a450f357396a91c6f5d8f8b83 /src/config/tasks/main.yaml | |
parent | 61469981d54bb1bc8349e4708829199cd93ba12a (diff) |
Add config role to install dotfiles
The config role will install the actual config files I use in the right
directories based on the options in the main config.yaml
Diffstat (limited to 'src/config/tasks/main.yaml')
-rw-r--r-- | src/config/tasks/main.yaml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/config/tasks/main.yaml b/src/config/tasks/main.yaml new file mode 100644 index 0000000..fe93e59 --- /dev/null +++ b/src/config/tasks/main.yaml @@ -0,0 +1,62 @@ +- name: Install shell items + block: + - name: Setup ZSH + ansible.builtin.dnf: + name: "zsh" + state: latest + - name: Setup oh-my-zsh + become: true + become_user: aaditya + ansible.builtin.shell: 'sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended' + + - name: Setup p10k, tmux and zshrc + ansible.builtin.copy: + src: shell/{{ item }} + dest: "/home/{{ config.username }}" + backup: yes + loop: + - .p10k.zsh + - .zshrc + - .tmux.conf + + - name: Setup vimrc and vim bundles + ansible.builtin.copy: + src: shell/{{ item }} + dest: "/home/{{ config.username }}" + backup: yes + loop: + - .vimrc + + - name: Setup vim/neovim directories + ansible.builtin.copy: + src: "{{ item }}" + dest: "/home/{{ config.username }}/.config" + backup: yes + loop: + - nvim + + when: 'config.config.install_shell' + +- name: Install Dotfiles (Wayland) + ansible.builtin.copy: + src: "{{ item }}" + dest: "/home/{{ config.username }}/.config/" + backup: yes + loop: "{{ config_wayland }}" + when: 'config.config.install_wayland' + +- name: Install Dotfiles (Xorg) + ansible.builtin.copy: + src: "{{ item }}" + dest: "/home/{{ config.username }}/.config/" + backup: yes + loop: "{{ config_xorg }}" + when: 'config.config.install_xorg' + +- name: Install Dotfiles (All) + ansible.builtin.copy: + src: "{{ item }}" + dest: "/home/{{ config.username }}/.config/" + backup: yes + loop: "{{ config_all }}" + when: "'config.config.install_xorg' or 'config.config.install_wayland'" |