[TIDY] fix ansible-lint issues

This commit is contained in:
Jannik Beyerstedt 2024-12-03 09:48:05 +01:00
parent 78df6551ac
commit 9f2be8edc6
5 changed files with 37 additions and 23 deletions

View file

@ -13,7 +13,7 @@
# Install Visual Studio Code and Set Basic Configuration # Install Visual Studio Code and Set Basic Configuration
- name: VSCode - Basics - name: VSCode - Basics
when: user_vscode == true when: user_vscode
block: block:
- name: VSCode - Basics - Install - name: VSCode - Basics - Install
become: true become: true
@ -37,14 +37,16 @@
ansible.builtin.file: ansible.builtin.file:
path: "{{ ansible_user_dir }}/.config/Code/User" path: "{{ ansible_user_dir }}/.config/Code/User"
state: directory state: directory
mode: "0755"
- name: VSCode - Basics - Copy global settings - name: VSCode - Basics - Copy global settings
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ role_path }}/files/vscode-settings.json" src: "{{ role_path }}/files/vscode-settings.json"
dest: "{{ ansible_user_dir }}/.config/Code/User/settings.json" dest: "{{ ansible_user_dir }}/.config/Code/User/settings.json"
mode: "0644"
# Dev Env - C/C++ Development Tools # Dev Env - C/C++ Development Tools
- name: Devel - C/C++ - name: Devel - C/C++
when: user_lang_cpp == true when: user_lang_cpp
block: block:
- name: Devel - C/C++ - Install developer tools - name: Devel - C/C++ - Install developer tools
become: true become: true
@ -61,7 +63,7 @@
# Dev Env - Golang Development Tools # Dev Env - Golang Development Tools
- name: Devel - Golang - name: Devel - Golang
when: user_lang_golang == true when: user_lang_golang
block: block:
- name: Devel - Golang - Install developer tools - name: Devel - Golang - Install developer tools
become: true become: true
@ -75,7 +77,7 @@
# Dev Env - LaTeX Distribution # Dev Env - LaTeX Distribution
- name: Devel - LaTeX - name: Devel - LaTeX
when: user_lang_latex == true when: user_lang_latex
block: block:
- name: Devel - LaTeX - Install basic TeX distribution - name: Devel - LaTeX - Install basic TeX distribution
become: true become: true

View file

@ -8,7 +8,7 @@
# Install Visual Studio Code and Set Basic Configuration # Install Visual Studio Code and Set Basic Configuration
- name: VSCode - Basics - name: VSCode - Basics
when: user_vscode == true when: user_vscode
block: block:
- name: VSCode - Basics - Install - name: VSCode - Basics - Install
community.general.homebrew_cask: community.general.homebrew_cask:
@ -35,14 +35,16 @@
ansible.builtin.file: ansible.builtin.file:
path: "{{ ansible_user_dir }}/Library/Application Support/Code/User" path: "{{ ansible_user_dir }}/Library/Application Support/Code/User"
state: directory state: directory
mode: "0755"
- name: VSCode - Basics - Copy global settings - name: VSCode - Basics - Copy global settings
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ role_path }}/files/vscode-settings.json" src: "{{ role_path }}/files/vscode-settings.json"
dest: "{{ ansible_user_dir }}/Library/Application Support/Code/User/settings.json" dest: "{{ ansible_user_dir }}/Library/Application Support/Code/User/settings.json"
mode: "0644"
# Dev Env - C/C++ Development Tools # Dev Env - C/C++ Development Tools
- name: Devel - C/C++ - name: Devel - C/C++
when: user_lang_cpp == true when: user_lang_cpp
block: block:
- name: Devel - C/C++ - Install developer tools - name: Devel - C/C++ - Install developer tools
community.general.homebrew: community.general.homebrew:
@ -58,7 +60,7 @@
# Dev Env - Golang Development Tools # Dev Env - Golang Development Tools
- name: Devel - Golang - name: Devel - Golang
when: user_lang_golang == true when: user_lang_golang
block: block:
- name: Devel - Golang - Install developer tools - name: Devel - Golang - Install developer tools
community.general.homebrew: community.general.homebrew:
@ -71,7 +73,7 @@
# Dev Env - LaTeX Distribution # Dev Env - LaTeX Distribution
- name: Devel - LaTeX - name: Devel - LaTeX
when: user_vscode == true and user_lang_latex == true when: user_vscode and user_lang_latex
block: block:
- name: Devel - LaTeX - Install basic TeX distribution - name: Devel - LaTeX - Install basic TeX distribution
community.general.homebrew_cask: community.general.homebrew_cask:

View file

@ -10,7 +10,7 @@
# Install Visual Studio Code and Set Basic Configuration # Install Visual Studio Code and Set Basic Configuration
- name: VSCode - Basics - name: VSCode - Basics
when: user_vscode == true when: user_vscode
block: block:
- name: VSCode - Basics - Add Repo Key - name: VSCode - Basics - Add Repo Key
become: true become: true
@ -46,14 +46,16 @@
ansible.builtin.file: ansible.builtin.file:
path: "{{ ansible_user_dir }}/.config/Code/User" path: "{{ ansible_user_dir }}/.config/Code/User"
state: directory state: directory
mode: "0755"
- name: VSCode - Basics - Copy global settings - name: VSCode - Basics - Copy global settings
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ role_path }}/files/vscode-settings.json" src: "{{ role_path }}/files/vscode-settings.json"
dest: "{{ ansible_user_dir }}/.config/Code/User/settings.json" dest: "{{ ansible_user_dir }}/.config/Code/User/settings.json"
mode: "0644"
# Dev Env - C/C++ Development Tools # Dev Env - C/C++ Development Tools
- name: Devel - C/C++ - name: Devel - C/C++
when: user_lang_cpp == true when: user_lang_cpp
block: block:
- name: Devel - C/C++ - Install developer tools - name: Devel - C/C++ - Install developer tools
become: true become: true
@ -70,7 +72,7 @@
# Dev Env - Golang Development Tools # Dev Env - Golang Development Tools
- name: Devel - Golang - name: Devel - Golang
when: user_lang_golang == true when: user_lang_golang
block: block:
- name: Devel - Golang - Install developer tools - name: Devel - Golang - Install developer tools
become: true become: true
@ -82,7 +84,7 @@
# Dev Env - LaTeX Distribution # Dev Env - LaTeX Distribution
- name: Devel - LaTeX - name: Devel - LaTeX
when: user_lang_latex == true when: user_lang_latex
block: block:
- name: Devel - LaTeX - Install basic TeX distribution - name: Devel - LaTeX - Install basic TeX distribution
ansible.builtin.package: ansible.builtin.package:

View file

@ -17,11 +17,11 @@
ansible.builtin.include_tasks: "{{ item }}" ansible.builtin.include_tasks: "{{ item }}"
with_first_found: with_first_found:
- "devel-{{ ansible_distribution }}.yml" - "devel-{{ ansible_distribution }}.yml"
- "devel-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml" - "devel-{{ (override_os_family is defined) | ternary(override_os_family, ansible_os_family) }}.yml"
# Install Visual Studio Code and Set Basic Configuration # Install Visual Studio Code and Set Basic Configuration
- name: VSCode - Basics - name: VSCode - Basics
when: user_vscode == true when: user_vscode
block: block:
- name: VSCode - Basics - Configure - name: VSCode - Basics - Configure
ansible.builtin.shell: | ansible.builtin.shell: |
@ -37,7 +37,7 @@
# VS Code - C/C++ Development Tools # VS Code - C/C++ Development Tools
- name: VSCode - C/C++ - name: VSCode - C/C++
when: user_vscode == true and user_lang_cpp == true when: user_vscode and user_lang_cpp
block: block:
- name: VSCode - C/C++ - Configure VS Code - name: VSCode - C/C++ - Configure VS Code
ansible.builtin.shell: | ansible.builtin.shell: |
@ -48,14 +48,14 @@
# VS Code - Python Development Tools # VS Code - Python Development Tools
- name: Devel - Python - Install python dev packages - name: Devel - Python - Install python dev packages
when: user_lang_python == true when: user_lang_python
ansible.builtin.pip: ansible.builtin.pip:
name: name:
- autopep8 - autopep8
# - pylint # must be installed in each venv individually! # - pylint # must be installed in each venv individually!
executable: "{{ override_pip_exe | default(default_pip3_exe) }}" executable: "{{ override_pip_exe | default(default_pip3_exe) }}"
- name: VSCode - Python - name: VSCode - Python
when: user_vscode == true and user_lang_python == true when: user_vscode and user_lang_python
block: block:
- name: VSCode - Python - Configure VS Code - name: VSCode - Python - Configure VS Code
ansible.builtin.shell: | ansible.builtin.shell: |
@ -65,16 +65,18 @@
# VC Code - Golang Development Tools # VC Code - Golang Development Tools
# https://golang.org/doc/install # https://golang.org/doc/install
- name: Devel - Golang - Setup Environment - name: Devel - Golang - Setup Environment
when: user_lang_golang == true when: user_lang_golang
block: block:
- name: Devel - Golang - Create workspace directory - name: Devel - Golang - Create workspace directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ user_lang_golang_gopath }}" path: "{{ user_lang_golang_gopath }}"
state: directory state: directory
mode: "0755"
- name: Devel - Golang - Create zshrc-host - name: Devel - Golang - Create zshrc-host
ansible.builtin.file: ansible.builtin.file:
path: "{{ ansible_user_dir }}/.zshrc-host" path: "{{ ansible_user_dir }}/.zshrc-host"
state: touch state: touch
mode: "0644"
- name: Devel - Golang - Add GOPATH - name: Devel - Golang - Add GOPATH
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: "{{ ansible_user_dir }}/.zshrc-host" path: "{{ ansible_user_dir }}/.zshrc-host"
@ -91,7 +93,7 @@
# and group all golang stuff in one section inside zshrc-host # and group all golang stuff in one section inside zshrc-host
- name: VSCode - Golang - name: VSCode - Golang
when: user_vscode == true and user_lang_golang == true when: user_vscode and user_lang_golang
block: block:
- name: VSCode - Golang - Configure VS Code - name: VSCode - Golang - Configure VS Code
ansible.builtin.shell: | ansible.builtin.shell: |
@ -100,7 +102,7 @@
# VS Code - LaTeX Distribution # VS Code - LaTeX Distribution
- name: Devel - LaTeX - Install TeX packages - name: Devel - LaTeX - Install TeX packages
when: user_lang_latex == true when: user_lang_latex
become: true become: true
ansible.builtin.shell: | ansible.builtin.shell: |
PATH=/Library/TeX/texbin:$PATH PATH=/Library/TeX/texbin:$PATH
@ -109,7 +111,7 @@
tlmgr install collection-fontsextra collection-fontsrecommended collection-fontutils collection-langgerman collection-langenglish collection-mathscience tlmgr install collection-fontsextra collection-fontsrecommended collection-fontutils collection-langgerman collection-langenglish collection-mathscience
tlmgr install todonotes textpos lipsum pgfopts xpatch enumitem nomencl glossaries glossaries-german glossaries-english datatool mfirstuc xfor substr tracklang placeins placeins-plain csquotes appendixnumberbeamer fontaxes hyphenat tlmgr install todonotes textpos lipsum pgfopts xpatch enumitem nomencl glossaries glossaries-german glossaries-english datatool mfirstuc xfor substr tracklang placeins placeins-plain csquotes appendixnumberbeamer fontaxes hyphenat
- name: VSCode - LaTeX - name: VSCode - LaTeX
when: user_vscode == true and user_lang_latex == true when: user_vscode and user_lang_latex
block: block:
- name: VSCode - Basics - Configure - name: VSCode - Basics - Configure
ansible.builtin.shell: | ansible.builtin.shell: |

View file

@ -69,6 +69,7 @@
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
mode: "0644"
with_items: with_items:
- { - {
src: "{{ role_path }}/files/_gitignore_global", src: "{{ role_path }}/files/_gitignore_global",
@ -86,6 +87,7 @@
ansible.builtin.file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
mode: "0755"
with_items: with_items:
- "{{ ansible_user_dir }}/.config/htop/" - "{{ ansible_user_dir }}/.config/htop/"
- name: Usersettings - Set templated dotfiles - name: Usersettings - Set templated dotfiles
@ -93,6 +95,7 @@
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
force: "{{ item.force }}" force: "{{ item.force }}"
mode: "0644"
ignore_errors: true ignore_errors: true
with_items: with_items:
- { - {
@ -116,22 +119,25 @@
force: false, force: false,
} }
- name: Usersettings - Set global gitconfig - name: Usersettings - Set global gitconfig
when: usersetup_gitconfig == true when: usersetup_gitconfig
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/_gitconfig.j2" src: "{{ role_path }}/templates/_gitconfig.j2"
dest: "{{ ansible_user_dir }}/.gitconfig" dest: "{{ ansible_user_dir }}/.gitconfig"
mode: "0644"
- name: Usersettings - Vim Plugings - name: Usersettings - Vim Plugings
when: usersetup_vimplugins == true when: usersetup_vimplugins
block: block:
- name: Usersettings - Create .vim directory - name: Usersettings - Create .vim directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ ansible_user_dir }}/.vim/autoload" path: "{{ ansible_user_dir }}/.vim/autoload"
state: directory state: directory
mode: "0755"
- name: Usersettings - Install vim plugin manager - name: Usersettings - Install vim plugin manager
ansible.builtin.get_url: ansible.builtin.get_url:
url: https://tpo.pe/pathogen.vim url: https://tpo.pe/pathogen.vim
dest: "{{ ansible_user_dir }}/.vim/autoload/pathogen.vim" dest: "{{ ansible_user_dir }}/.vim/autoload/pathogen.vim"
mode: "0644"
- name: Usersettings - Install vim plugins - name: Usersettings - Install vim plugins
ansible.builtin.git: ansible.builtin.git:
repo: "{{ item.repo }}" repo: "{{ item.repo }}"