diff --git a/roles/dotfiles/meta/main.yml b/roles/dotfiles/meta/main.yml new file mode 100644 index 0000000..224baa7 --- /dev/null +++ b/roles/dotfiles/meta/main.yml @@ -0,0 +1,6 @@ +--- +galaxy_info: + author: cjr + description: Clone dotfiles and nvim config repos and symlink into place + license: BSD-3-Clause + min_ansible_version: "2.1" diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml new file mode 100644 index 0000000..5f3e6ad --- /dev/null +++ b/roles/dotfiles/tasks/main.yml @@ -0,0 +1,28 @@ +--- +- name: Clone dot files repo + ansible.builtin.git: + repo: https://gitea.learningunix.net/cjr/dotfiles.git + dest: "{{ ansible_user_home }}/dotfiles" + update: true + version: main + +- name: Clone the nvim repo + ansible.builtin.git: + repo: https://gitea.learningunix.net/cjr/vim.git + dest: "{{ ansible_user_home }}/nvim" + update: true + version: main + +- name: Symlink .zshrc + ansible.builtin.file: + src: "{{ ansible_user_home }}/dotfiles/zsh/.zshrc" + dest: "{{ ansible_user_home }}/.zshrc" + state: link + force: true + +- name: Symlink nvim config + ansible.builtin.file: + src: "{{ ansible_user_home }}/nvim" + dest: "{{ ansible_user_home }}/.config/nvim" + state: link + force: true