From 0627f244864a96204f08a46a850313664b3ad333 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:10:49 +0200 Subject: [PATCH 01/12] vim -E -s -c "source ~/.vimrc" -c PluginInstall -c qa --- roles/mgrote_user_setup/handlers/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_user_setup/handlers/main.yml b/roles/mgrote_user_setup/handlers/main.yml index 4e6ae4be..0a6edcf6 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: vim -E -s -c "source ~/.vimrc" -c PluginInstall -c qa args: chdir: "{{ item.home }}" loop: "{{ dotfiles }}" -- 2.43.0 From 11fdc25470bf0559af2149134478c81b9cf63d52 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:12:49 +0200 Subject: [PATCH 02/12] dd --- roles/mgrote_user_setup/handlers/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_user_setup/handlers/main.yml b/roles/mgrote_user_setup/handlers/main.yml index 0a6edcf6..cf953099 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: vim -E -s -c "source ~/.vimrc" -c PluginInstall -c qa + ansible.builtin.shell: vim -E -s -c PluginInstall -c qall args: chdir: "{{ item.home }}" loop: "{{ dotfiles }}" -- 2.43.0 From 836e374731b81c1bc2e661ab81a36b4d63051f60 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:15:02 +0200 Subject: [PATCH 03/12] ff --- roles/mgrote_user_setup/tasks/main.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/mgrote_user_setup/tasks/main.yml b/roles/mgrote_user_setup/tasks/main.yml index a902c2fb..6df170a8 100644 --- a/roles/mgrote_user_setup/tasks/main.yml +++ b/roles/mgrote_user_setup/tasks/main.yml @@ -76,7 +76,7 @@ state: present loop: "{{ dotfiles }}" -- name: Ensure needed dirs exist +- name: Ensure needed vundle dirs exist become: true ansible.builtin.file: state: directory @@ -86,6 +86,16 @@ mode: '0755' loop: "{{ dotfiles }}" +- name: Ensure needed spell dirs exist + become: true + ansible.builtin.file: + state: directory + path: "{{ item.home }}/.vim/spell/" + owner: "{{ item.user }}" + group: "{{ item.user }}" + mode: '0755' + loop: "{{ dotfiles }}" + - name: Ensure vundle-repository is cloned become: true become_user: "{{ item.user }}" -- 2.43.0 From e44ff803bbd25ecae87f139a9318ee5d9e6845db Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:16:44 +0200 Subject: [PATCH 04/12] sdf --- roles/mgrote_user_setup/handlers/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_user_setup/handlers/main.yml b/roles/mgrote_user_setup/handlers/main.yml index cf953099..3a035913 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: vim -E -s -c PluginInstall -c qall + ansible.builtin.shell: yes | vim -E -c PluginInstall -c qall args: chdir: "{{ item.home }}" loop: "{{ dotfiles }}" -- 2.43.0 From 972e33ec5aaa2f9962c16f2c0993f037ea31aaf2 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:18:08 +0200 Subject: [PATCH 05/12] dd --- roles/mgrote_user_setup/handlers/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/mgrote_user_setup/handlers/main.yml b/roles/mgrote_user_setup/handlers/main.yml index 3a035913..eb9c281a 100644 --- a/roles/mgrote_user_setup/handlers/main.yml +++ b/roles/mgrote_user_setup/handlers/main.yml @@ -6,4 +6,6 @@ args: chdir: "{{ item.home }}" loop: "{{ dotfiles }}" + register: plugin.rc + successful_when: plugin.rc == 1 ... -- 2.43.0 From fe369a70be448a9fb2a4b58887371584f20c6fd4 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:18:36 +0200 Subject: [PATCH 06/12] ff --- roles/mgrote_user_setup/handlers/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mgrote_user_setup/handlers/main.yml b/roles/mgrote_user_setup/handlers/main.yml index eb9c281a..0429b5f9 100644 --- a/roles/mgrote_user_setup/handlers/main.yml +++ b/roles/mgrote_user_setup/handlers/main.yml @@ -2,10 +2,10 @@ - name: Vundle - PluginInstall # noqa no-changed-when risky-shell-pipe become: true become_user: "{{ item.user }}" - ansible.builtin.shell: yes | vim -E -c PluginInstall -c qall + ansible.builtin.shell: "yes | vim -E -c PluginInstall -c qall" args: chdir: "{{ item.home }}" loop: "{{ dotfiles }}" - register: plugin.rc + register: plugin successful_when: plugin.rc == 1 ... -- 2.43.0 From 1d6f27a2ce7897aead09ac0c4afe06ca46929b58 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:19:00 +0200 Subject: [PATCH 07/12] dd --- roles/mgrote_user_setup/handlers/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_user_setup/handlers/main.yml b/roles/mgrote_user_setup/handlers/main.yml index 0429b5f9..5a86c87e 100644 --- a/roles/mgrote_user_setup/handlers/main.yml +++ b/roles/mgrote_user_setup/handlers/main.yml @@ -7,5 +7,5 @@ chdir: "{{ item.home }}" loop: "{{ dotfiles }}" register: plugin - successful_when: plugin.rc == 1 + changed_when: "plugin.rc == 1" ... -- 2.43.0 From 15698fdb981f681cc19d112637b7d3de527d4749 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:43:29 +0200 Subject: [PATCH 08/12] dd --- roles/mgrote_user_setup/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.43.0 From 97f32d7b8b46bb2c1a9c2efb40bec7fdcf4e3843 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:45:08 +0200 Subject: [PATCH 09/12] ff --- roles/mgrote_user_setup/handlers/main.yml | 4 +--- roles/mgrote_user_setup/tasks/main.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/roles/mgrote_user_setup/handlers/main.yml b/roles/mgrote_user_setup/handlers/main.yml index 5a86c87e..2ccc4475 100644 --- a/roles/mgrote_user_setup/handlers/main.yml +++ b/roles/mgrote_user_setup/handlers/main.yml @@ -2,10 +2,8 @@ - name: Vundle - PluginInstall # noqa no-changed-when risky-shell-pipe become: true become_user: "{{ item.user }}" - ansible.builtin.shell: "yes | vim -E -c PluginInstall -c qall" + ansible.builtin.shell: "yes | vim -c PluginInstall -c qall" args: chdir: "{{ item.home }}" loop: "{{ dotfiles }}" - register: plugin - changed_when: "plugin.rc == 1" ... diff --git a/roles/mgrote_user_setup/tasks/main.yml b/roles/mgrote_user_setup/tasks/main.yml index 6df170a8..b1dc3dfa 100644 --- a/roles/mgrote_user_setup/tasks/main.yml +++ b/roles/mgrote_user_setup/tasks/main.yml @@ -68,6 +68,19 @@ group: "{{ item.user }}" 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: -- 2.43.0 From 88bd294f1c6cfb26c752f9b3f11624213ff0acbe Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:46:37 +0200 Subject: [PATCH 10/12] dd --- roles/mgrote_user_setup/tasks/main.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/roles/mgrote_user_setup/tasks/main.yml b/roles/mgrote_user_setup/tasks/main.yml index b1dc3dfa..f59f38f7 100644 --- a/roles/mgrote_user_setup/tasks/main.yml +++ b/roles/mgrote_user_setup/tasks/main.yml @@ -68,6 +68,16 @@ 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: @@ -80,7 +90,6 @@ group: "{{ item.user }}" loop: "{{ dotfiles }}" - - name: add source .bash_extra to user .bashrc become: true ansible.builtin.lineinfile: @@ -99,16 +108,6 @@ mode: '0755' loop: "{{ dotfiles }}" -- name: Ensure needed spell dirs exist - become: true - ansible.builtin.file: - state: directory - path: "{{ item.home }}/.vim/spell/" - owner: "{{ item.user }}" - group: "{{ item.user }}" - mode: '0755' - loop: "{{ dotfiles }}" - - name: Ensure vundle-repository is cloned become: true become_user: "{{ item.user }}" -- 2.43.0 From fb19092db3ddab1130e7ebe35d4a8e26ed533e89 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:48:51 +0200 Subject: [PATCH 11/12] dd --- roles/mgrote_user_setup/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mgrote_user_setup/tasks/main.yml b/roles/mgrote_user_setup/tasks/main.yml index f59f38f7..5de33b82 100644 --- a/roles/mgrote_user_setup/tasks/main.yml +++ b/roles/mgrote_user_setup/tasks/main.yml @@ -81,7 +81,7 @@ - name: Link vim spelldir become: true ansible.builtin.file: - src: "{{ item.home }}/dotfiles/.vim/spell" + src: "{{ item.home }}/dotfiles/.vim/spell/" dest: "{{ item.home }}/.vim/spell/" state: link follow: false # https://github.com/ansible/ansible/issues/73143 -- 2.43.0 From 35510bd94ba8eb84d20eb227396ef35dca3961da Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 8 Oct 2024 17:49:46 +0200 Subject: [PATCH 12/12] dd --- roles/mgrote_user_setup/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mgrote_user_setup/tasks/main.yml b/roles/mgrote_user_setup/tasks/main.yml index 5de33b82..c0995f31 100644 --- a/roles/mgrote_user_setup/tasks/main.yml +++ b/roles/mgrote_user_setup/tasks/main.yml @@ -81,8 +81,8 @@ - name: Link vim spelldir become: true ansible.builtin.file: - src: "{{ item.home }}/dotfiles/.vim/spell/" - dest: "{{ item.home }}/.vim/spell/" + src: "{{ item.home }}/dotfiles/vim/spell/" + dest: "{{ item.home }}/.vim/spell" state: link follow: false # https://github.com/ansible/ansible/issues/73143 force: true -- 2.43.0