From 6a7eb46d718e9af2dac0490ada48ca0ba5f2d681 Mon Sep 17 00:00:00 2001 From: Maxim Vershinin Date: Mon, 17 Aug 2026 12:30:38 +0400 Subject: [PATCH] CHANGE: splits update_configs role into app-based files --- roles/update_configs/tasks/main.yaml | 36 ++++---------------------- roles/update_configs/tasks/nvim.yaml | 14 ++++++++++ roles/update_configs/tasks/omz.yaml | 8 ++++++ roles/update_configs/tasks/ranger.yaml | 22 ++++++++++++++++ roles/update_configs/tasks/vim.yaml | 10 +++++++ 5 files changed, 59 insertions(+), 31 deletions(-) create mode 100644 roles/update_configs/tasks/nvim.yaml create mode 100644 roles/update_configs/tasks/omz.yaml create mode 100644 roles/update_configs/tasks/ranger.yaml create mode 100644 roles/update_configs/tasks/vim.yaml diff --git a/roles/update_configs/tasks/main.yaml b/roles/update_configs/tasks/main.yaml index a83af99..2235d44 100644 --- a/roles/update_configs/tasks/main.yaml +++ b/roles/update_configs/tasks/main.yaml @@ -1,39 +1,13 @@ --- - name: Configure oh my zsh, by pushing the config file - ansible.builtin.copy: - src: "{{ role_path }}/files/.zshrc" - dest: /home/max/.zshrc - owner: max - group: max - mode: u=rw,g=r,o-rwx + ansible.builtin.include_tasks: omz.yaml - name: Configure vim, by pushing the config - ansible.builtin.copy: - src: "{{ role_path }}/files/.vimrc" - dest: /home/max/.vimrc - owner: max - group: max - mode: u=rw,g=r,o-rwx + ansible.builtin.include_tasks: vim.yaml - name: Configure ranger, by pushing the config - ansible.builtin.copy: - src: "{{ role_path }}/files/ranger_config/" - dest: /home/max/.config/ranger - owner: max - group: max - mode: u=rw,g=r,o-rwx + ansible.builtin.include_tasks: ranger.yaml -- name: Make sure ~/.config/ranger/scope.sh is executable - ansible.builtin.file: - path: /home/max/.config/ranger/scope.sh - owner: max - group: max - mode: u=rwx,g=rx,o-rwx +- name: Configure Neovim, by pushing the config + ansible.builtin.include_tasks: nvim.yaml -- name: Configure neovim, by pushing the config - ansible.builtin.copy: - src: "{{ role_path }}/files/nvim_config/" - dest: /home/max/.config/nvim - owner: max - group: max - mode: u=rw,g=r,o-rwx diff --git a/roles/update_configs/tasks/nvim.yaml b/roles/update_configs/tasks/nvim.yaml new file mode 100644 index 0000000..d7b9d94 --- /dev/null +++ b/roles/update_configs/tasks/nvim.yaml @@ -0,0 +1,14 @@ +--- + +- name: Clear old Neovim config + ansible.builtin.file: + state: absent + path: /home/max/.config/nvim + +- name: Configure neovim, by pushing the config + ansible.builtin.copy: + src: "{{ role_path }}/files/nvim_config/" + dest: /home/max/.config/nvim + owner: max + group: max + mode: u=rw,g=r,o-rwx diff --git a/roles/update_configs/tasks/omz.yaml b/roles/update_configs/tasks/omz.yaml new file mode 100644 index 0000000..dd58da7 --- /dev/null +++ b/roles/update_configs/tasks/omz.yaml @@ -0,0 +1,8 @@ +--- +- name: Configure oh my zsh, by pushing the config file + ansible.builtin.copy: + src: "{{ role_path }}/files/.zshrc" + dest: /home/max/.zshrc + owner: max + group: max + mode: u=rw,g=r,o-rwx diff --git a/roles/update_configs/tasks/ranger.yaml b/roles/update_configs/tasks/ranger.yaml new file mode 100644 index 0000000..d53538e --- /dev/null +++ b/roles/update_configs/tasks/ranger.yaml @@ -0,0 +1,22 @@ +--- + +- name: Clear old config + ansible.builtin.file: + state: absent + path: /home/max/.config/ranger + +- name: Configure ranger, by pushing the config + ansible.builtin.copy: + src: "{{ role_path }}/files/ranger_config/" + dest: /home/max/.config/ranger + owner: max + group: max + mode: u=rw,g=r,o-rwx + +- name: Make sure ~/.config/ranger/scope.sh is executable + ansible.builtin.file: + path: /home/max/.config/ranger/scope.sh + owner: max + group: max + mode: u=rwx,g=rx,o-rwx + diff --git a/roles/update_configs/tasks/vim.yaml b/roles/update_configs/tasks/vim.yaml new file mode 100644 index 0000000..5ee76d9 --- /dev/null +++ b/roles/update_configs/tasks/vim.yaml @@ -0,0 +1,10 @@ +--- + +- name: Configure vim, by pushing the config + ansible.builtin.copy: + src: "{{ role_path }}/files/.vimrc" + dest: /home/max/.vimrc + owner: max + group: max + mode: u=rw,g=r,o-rwx +