From defd4bc9331fca1f9c59906e86221696cea3a832 Mon Sep 17 00:00:00 2001 From: Aaditya Dhruv Date: Sun, 10 Sep 2023 12:01:02 -0500 Subject: 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 --- src/config/tasks/main.yaml | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/config/tasks/main.yaml (limited to 'src/config/tasks/main.yaml') 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'" -- cgit