From b3e8d0967b2dba99bcea4f6f401613ba2685c1e0 Mon Sep 17 00:00:00 2001 From: mg Date: Mon, 7 Jun 2021 17:47:50 +0200 Subject: [PATCH] laptop rollen (#107) vim when vundle bugfix dotfiles readme syntax polybar defaults vim defaults Co-authored-by: Michael Grote Reviewed-on: https://git.mgrote.net/mg/ansible/pulls/107 Co-Authored-By: mg Co-Committed-By: mg --- roles/mgrote.dotfiles/tasks/main.yml | 8 ++------ roles/mgrote.i3/readme.md | 4 ++++ roles/mgrote.polybar/defaults/main.yml | 3 +++ roles/mgrote.polybar/readme.md | 7 +++++++ roles/mgrote.polybar/tasks/main.yml | 4 ++-- roles/mgrote.vim/defaults/main.yml | 4 ++++ roles/mgrote.vim/readme.md | 7 +++++++ roles/mgrote.vim/tasks/main.yml | 10 +++++----- 8 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 roles/mgrote.i3/readme.md create mode 100644 roles/mgrote.polybar/defaults/main.yml create mode 100644 roles/mgrote.polybar/readme.md create mode 100644 roles/mgrote.vim/defaults/main.yml create mode 100644 roles/mgrote.vim/readme.md diff --git a/roles/mgrote.dotfiles/tasks/main.yml b/roles/mgrote.dotfiles/tasks/main.yml index c87c8b64..fe83013d 100644 --- a/roles/mgrote.dotfiles/tasks/main.yml +++ b/roles/mgrote.dotfiles/tasks/main.yml @@ -10,7 +10,7 @@ repo: "{{ dotfiles_repo_url }}" dest: "{{ dotfiles_repo_path }}" depth: 1 - become_user: "{{ dotfiles_owner }}" + register: git_clone - name: set owner recursive for repo file: @@ -18,6 +18,7 @@ owner: "{{ dotfiles_owner }}" group: "{{ dotfiles_owner }}" recurse: yes + when: (git_clone.changed == true) - name: Ensure needed dirs exist. file: @@ -34,8 +35,3 @@ owner: "{{ dotfiles_owner }}" group: "{{ dotfiles_owner }}" with_items: "{{ dotfiles_files }}" - - -# recurse: yes -# owner: foo -# group: foo diff --git a/roles/mgrote.i3/readme.md b/roles/mgrote.i3/readme.md new file mode 100644 index 00000000..f45cf8a6 --- /dev/null +++ b/roles/mgrote.i3/readme.md @@ -0,0 +1,4 @@ +## mgrote.vim + +### Beschreibung +installiert i3 + tools. diff --git a/roles/mgrote.polybar/defaults/main.yml b/roles/mgrote.polybar/defaults/main.yml new file mode 100644 index 00000000..466d1d05 --- /dev/null +++ b/roles/mgrote.polybar/defaults/main.yml @@ -0,0 +1,3 @@ +--- + polybar_siji_repo: https://github.com/stark/siji + polybar_siji_local: /home/mg/siji diff --git a/roles/mgrote.polybar/readme.md b/roles/mgrote.polybar/readme.md new file mode 100644 index 00000000..bd81a8b4 --- /dev/null +++ b/roles/mgrote.polybar/readme.md @@ -0,0 +1,7 @@ +## mgrote.polybar + +### Beschreibung +installiert polybar, siji-font und setzt die rechte für das backlight. + +### Variablen + Defaults +- see [defaults](./defaults/main.yml) diff --git a/roles/mgrote.polybar/tasks/main.yml b/roles/mgrote.polybar/tasks/main.yml index ea7d74ca..69fef2e7 100644 --- a/roles/mgrote.polybar/tasks/main.yml +++ b/roles/mgrote.polybar/tasks/main.yml @@ -8,8 +8,8 @@ - name: checkout siji font ansible.builtin.git: - repo: https://github.com/stark/siji - dest: /home/mg/siji + repo: "{{ polybar_siji_repo }}" + dest: "{{ polybar_siji_local }}" register: gitcheckout - name: install siji-font diff --git a/roles/mgrote.vim/defaults/main.yml b/roles/mgrote.vim/defaults/main.yml new file mode 100644 index 00000000..88e992c7 --- /dev/null +++ b/roles/mgrote.vim/defaults/main.yml @@ -0,0 +1,4 @@ +--- + vim_vundle_path: /home/mg/.vim/bundle/Vundle.vim + vim_vundle_repo_url: https://github.com/VundleVim/Vundle.vim.git + vim_homedir: /home/mg/.vim diff --git a/roles/mgrote.vim/readme.md b/roles/mgrote.vim/readme.md new file mode 100644 index 00000000..245ec04a --- /dev/null +++ b/roles/mgrote.vim/readme.md @@ -0,0 +1,7 @@ +## mgrote.vim + +### Beschreibung +installiert vim und installiert plugins per vundle + +### Variablen + Defaults +- see [defaults](./defaults/main.yml) diff --git a/roles/mgrote.vim/tasks/main.yml b/roles/mgrote.vim/tasks/main.yml index c336e34d..3e8663ea 100644 --- a/roles/mgrote.vim/tasks/main.yml +++ b/roles/mgrote.vim/tasks/main.yml @@ -10,18 +10,18 @@ - name: check if vundle is installed - folder become: yes stat: - path: "/home/mg/.vim/bundle/Vundle.vim" + path: "{{ vim_vundle_path }}" register: folder_exists - name: Ensure repository is cloned locally. git: - repo: https://github.com/VundleVim/Vundle.vim.git - dest: /home/mg/.vim/bundle/Vundle.vim + repo: "{{ vim_vundle_repo_url }}" + dest: "{{ vim_vundle_path }}" depth: 1 - name: set owner recursive for repo file: - path: /home/mg/.vim + path: "{{ vim_homedir }}" owner: mg group: mg recurse: yes @@ -31,4 +31,4 @@ args: chdir: /home/mg become_user: mg - # when: (folder_exists.stat.exists == False) + when: (folder_exists.stat.exists == False)