From 03ddd20412fb9a915fc65349f6138131c4ba7da8 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:52:39 +0200 Subject: [PATCH] fix vim vundle plugin install (#204) Reviewed-on: https://git.mgrote.net///mg/homeserver/pulls/204 Co-authored-by: Michael Grote Co-committed-by: Michael Grote --- roles/mgrote_user_setup/defaults/main.yml | 2 +- roles/mgrote_user_setup/handlers/main.yml | 2 +- roles/mgrote_user_setup/tasks/main.yml | 24 ++++++++++++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/roles/mgrote_user_setup/defaults/main.yml b/roles/mgrote_user_setup/defaults/main.yml index 50de0e60..5076c226 100644 --- a/roles/mgrote_user_setup/defaults/main.yml +++ b/roles/mgrote_user_setup/defaults/main.yml @@ -8,5 +8,5 @@ dotfiles: ansible_forgejo_user: svc_ansible ansible_forgejo_user_pass: "{{ lookup('viczem.keepass.keepass', 'user_setup_forgejo_user_pass', 'password') }}" # user ist dem Repo als "Collaborator" + "RO" hinzugefĆ¼gt worden -dotfiles_vim_vundle_repo_url: "https://{{ ansible_forgejo_user | urlencode }}:{{ ansible_forgejo_user_pass | urlencode }}@git.mgrote.net/mirrors/Vundle.vim.git" +dotfiles_vim_vundle_repo_url: "https://github.com/VundleVim/Vundle.vim.git" dotfiles_repo_url: https://git.mgrote.net/mg/dotfiles diff --git a/roles/mgrote_user_setup/handlers/main.yml b/roles/mgrote_user_setup/handlers/main.yml index 4e6ae4be..2ccc4475 100644 --- a/roles/mgrote_user_setup/handlers/main.yml +++ b/roles/mgrote_user_setup/handlers/main.yml @@ -2,7 +2,7 @@ - name: Vundle - PluginInstall # noqa no-changed-when risky-shell-pipe become: true become_user: "{{ item.user }}" - ansible.builtin.shell: yes yes yes | vim -c PluginInstall -c qall + ansible.builtin.shell: "yes | vim -c PluginInstall -c qall" args: chdir: "{{ item.home }}" loop: "{{ dotfiles }}" diff --git a/roles/mgrote_user_setup/tasks/main.yml b/roles/mgrote_user_setup/tasks/main.yml index a902c2fb..c0995f31 100644 --- a/roles/mgrote_user_setup/tasks/main.yml +++ b/roles/mgrote_user_setup/tasks/main.yml @@ -68,6 +68,28 @@ group: "{{ item.user }}" loop: "{{ dotfiles }}" +- name: Ensure needed vim dirs exist + become: true + ansible.builtin.file: + state: directory + path: "{{ item.home }}/.vim/" + owner: "{{ item.user }}" + group: "{{ item.user }}" + mode: '0755' + loop: "{{ dotfiles }}" + +- name: Link vim spelldir + become: true + ansible.builtin.file: + src: "{{ item.home }}/dotfiles/vim/spell/" + dest: "{{ item.home }}/.vim/spell" + state: link + follow: false # https://github.com/ansible/ansible/issues/73143 + force: true + owner: "{{ item.user }}" + group: "{{ item.user }}" + loop: "{{ dotfiles }}" + - name: add source .bash_extra to user .bashrc become: true ansible.builtin.lineinfile: @@ -76,7 +98,7 @@ state: present loop: "{{ dotfiles }}" -- name: Ensure needed dirs exist +- name: Ensure needed vundle dirs exist become: true ansible.builtin.file: state: directory