Compare commits

..

No commits in common. "4715b1dacd759e2d3e763911f59b3d0d2f06b707" and "49d7bb3fa7c18e2f6eb10d6f0482bd2f45bc389d" have entirely different histories.

13 changed files with 76 additions and 87 deletions

View file

@ -69,27 +69,27 @@ Or call the different tasks individually:
hosts: all
tasks:
- name: Basics - Update first
when: common_settingsonly | default(false) == false
ansible.builtin.import_role:
name: common
tasks_from: update
when: common_settingsonly | default(false) == false
## Run rasks from the role's main.yml
- name: Basics - Install essential tools
when: common_settingsonly | default(false) == false
ansible.builtin.import_role:
name: common
tasks_from: essentials
- name: Basics - Install basic tools
when: common_settingsonly | default(false) == false
- name: Basics - Install basic tools
ansible.builtin.import_role:
name: common
tasks_from: tools
- name: Basics - Setup user shell
when: common_settingsonly | default(false) == false
- name: Basics - Setup user shell
ansible.builtin.import_role:
name: common
tasks_from: usersetup
when: common_settingsonly | default(false) == false
- name: Basics - Install dotfiles
ansible.builtin.import_role:
name: common

View file

@ -11,7 +11,6 @@
# Install Visual Studio Code and Set Basic Configuration
- name: vscode - Basics
when: user_vscode == true
block:
- name: vscode - Basics - Install
ansible.builtin.package:
@ -29,16 +28,16 @@
- plantuml
- name: vscode - Basics - Create settings directory
ansible.builtin.file:
path: "{{ ansible_user_dir }}/.config/Code/User"
path: "{{ ansible_user_dir }}/.config/Code/User"
state: directory
- name: vscode - Basics - Copy global settings
ansible.builtin.copy:
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"
when: user_vscode == true
# Dev Env - C/C++ Development Tools
- name: devel - C/C++
when: user_lang_cpp == true
block:
- name: devel - C/C++ - Install developer tools
ansible.builtin.package:
@ -47,13 +46,13 @@
vars:
packages:
- clang-format
when: user_lang_cpp == true
# Dev Env - Python Development Tools
# all done in vscode.yml
# Dev Env - Golang Development Tools
- name: devel - Golang
when: user_lang_golang == true
block:
- name: devel - Golang - Install developer tools
ansible.builtin.package:
@ -62,10 +61,10 @@
vars:
packages:
- go
when: user_lang_golang == true
# Dev Env - LaTeX Distribution
- name: devel - LaTeX
when: user_lang_latex == true
block:
- name: devel - LaTeX - Install basic TeX distribution
ansible.builtin.package:
@ -78,3 +77,4 @@
# - texlive-science
# - texlive-fontsextra
- biber
when: user_lang_latex == true

View file

@ -8,7 +8,6 @@
# Install Visual Studio Code and Set Basic Configuration
- name: vscode - Basics
when: user_vscode == true
block:
- name: vscode - Basics - Install
ansible.builtin.homebrew_cask:
@ -33,16 +32,16 @@
# - graphviz
- name: vscode - Basics - Create settings directory
ansible.builtin.file:
path: "{{ ansible_user_dir }}/Library/Application Support/Code/User"
path: "{{ ansible_user_dir }}/Library/Application Support/Code/User"
state: directory
- name: vscode - Basics - Copy global settings
ansible.builtin.copy:
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"
when: user_vscode == true
# Dev Env - C/C++ Development Tools
- name: devel - C/C++
when: user_lang_cpp == true
block:
- name: devel - C/C++ - Install developer tools
ansible.builtin.homebrew:
@ -51,13 +50,13 @@
vars:
packages:
- clang-format
when: user_lang_cpp == true
# Dev Env - Python Development Tools
# all done in vscode.yml
# Dev Env - Golang Development Tools
- name: devel - Golang
when: user_lang_golang == true
block:
- name: devel - Golang - Install developer tools
ansible.builtin.homebrew:
@ -66,10 +65,10 @@
vars:
packages:
- go
when: user_lang_golang == true
# Dev Env - LaTeX Distribution
- name: devel - LaTeX
when: user_vscode == true and user_lang_latex == true
block:
- name: devel - LaTeX - Install basic TeX distribution
ansible.builtin.homebrew_cask:
@ -79,3 +78,4 @@
packages:
- basictex
- tex-live-utility
when: user_vscode == true and user_lang_latex == true

View file

@ -9,7 +9,6 @@
# Install Visual Studio Code and Set Basic Configuration
- name: vscode - Basics
when: user_vscode == true
block:
- name: vscode - Basics - Add Repo Key
become: yes
@ -41,16 +40,16 @@
- graphviz
- name: vscode - Basics - Create settings directory
ansible.builtin.file:
path: "{{ ansible_user_dir }}/.config/Code/User"
path: "{{ ansible_user_dir }}/.config/Code/User"
state: directory
- name: vscode - Basics - Copy global settings
ansible.builtin.copy:
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"
when: user_vscode == true
# Dev Env - C/C++ Development Tools
- name: devel - C/C++
when: user_lang_cpp == true
block:
- name: devel - C/C++ - Install developer tools
become: yes
@ -60,13 +59,13 @@
vars:
packages:
- clang-format
when: user_lang_cpp == true
# Dev Env - Python Development Tools
# all done in vscode.yml
# Dev Env - Golang Development Tools
- name: devel - Golang
when: user_lang_golang == true
block:
- name: devel - Golang - Install developer tools
become: yes
@ -76,10 +75,10 @@
vars:
packages:
- golang
when: user_lang_golang == true
# Dev Env - LaTeX Distribution
- name: devel - LaTeX
when: user_lang_latex == true
block:
- name: devel - LaTeX - Install basic TeX distribution
ansible.builtin.package:
@ -92,3 +91,4 @@
# - texlive-science
# - texlive-fonts-extra
- biber
when: user_lang_latex == true

View file

@ -21,7 +21,6 @@
# Install Visual Studio Code and Set Basic Configuration
- name: vscode - Basics
when: user_vscode == true
block:
- name: vscode - Basics - Configure
ansible.builtin.shell: |
@ -34,10 +33,10 @@
code --install-extension jebbs.plantuml
code --install-extension mechatroner.rainbow-csv
code --install-extension grapecity.gc-excelviewer
when: user_vscode == true
# VS Code - C/C++ Development Tools
- name: vscode - C/C++
when: user_vscode == true and user_lang_cpp == true
block:
- name: vscode - C/C++ - Configure VS Code
ansible.builtin.shell: |
@ -45,27 +44,27 @@
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cmake-tools
code --install-extension twxs.cmake
when: user_vscode == true and user_lang_cpp == true
# VS Code - Python Development Tools
- name: devel - Python - Install python dev packages
when: user_lang_python == true
ansible.builtin.pip:
name:
- autopep8
# - pylint # must be installed in each venv individually!
executable: "{{ override_pip_exe | default(default_pip3_exe) }}"
when: user_lang_python == true
- name: vscode - Python
when: user_vscode == true and user_lang_python == true
block:
- name: vscode - Python - Configure VS Code
ansible.builtin.shell: |
PATH=/usr/local/bin:$PATH
code --install-extension ms-python.python
when: user_vscode == true and user_lang_python == true
# VC Code - Golang Development Tools
# https://golang.org/doc/install
- name: devel - Golang - Setup Environment
when: user_lang_golang == true
block:
- name: devel - Golang - Create workspace directory
ansible.builtin.file:
@ -89,29 +88,30 @@
backup: yes
# TODO: make this resilient against changes
# and group all golang stuff in one section inside zshrc-host
when: user_lang_golang == true
- name: vscode - Golang
when: user_vscode == true and user_lang_golang == true
block:
- name: vscode - Golang - Configure VS Code
ansible.builtin.shell: |
PATH=/usr/local/bin:$PATH
code --install-extension golang.go
when: user_vscode == true and user_lang_golang == true
# VS Code - LaTeX Distribution
- name: devel - LaTeX - Install TeX packages
when: user_lang_latex == true
become: yes
ansible.builtin.shell: |
PATH=/Library/TeX/texbin:$PATH
tlmgr install latexmk latexindent biblatex logreq xstring biber
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
when: user_lang_latex == true
- name: vscode - LaTeX
when: user_vscode == true and user_lang_latex == true
block:
- name: vscode - Basics - Configure
ansible.builtin.shell: |
PATH=/usr/local/bin:$PATH
code --install-extension james-yu.latex-workshop
code --install-extension ban.spellright
when: user_vscode == true and user_lang_latex == true

View file

@ -10,18 +10,18 @@
# if role has not changed, this will not be needed when just installing updates
- name: Install essential tools
when: common_settingsonly | default(false) == false
ansible.builtin.include_tasks: essentials.yml
when: common_settingsonly | default(false) == false
# if role has not changed, this will not be needed when just installing updates
- name: Install more tools
when: common_settingsonly | default(false) == false
ansible.builtin.include_tasks: tools.yml
when: common_settingsonly | default(false) == false
# this will just run once, because of a lock-file
- name: Basics - Setup user shell
when: common_settingsonly | default(false) == false
ansible.builtin.include_tasks: usersetup.yml
when: common_settingsonly | default(false) == false
# run this for every maintenance/ update cycle
- name: Apply user settings

View file

@ -3,13 +3,14 @@
- name: usersettings - Install required tools
become: yes
ignore_errors: yes # just fail on systems without sudo access
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) != "Darwin"
ansible.builtin.package:
name: "{{ packages }}"
state: present
vars:
packages:
- git
- python3-pip
- name: usersettings - Install/ Update oh-my-zsh for current user
ansible.builtin.git:
@ -22,44 +23,32 @@
dest: .fzf
register: fzf_git
- name: (Re-)Install fzf
ansible.builtin.shell: ".fzf/install --key-bindings --no-completion --no-update-rc"
when:
- fzf_git.after != fzf_git.before
ansible.builtin.shell: ".fzf/install --key-bindings --no-completion --no-update-rc"
- name: usersettings - Install pip virtualenvwrapper
when: usersetup_virtualenvwrapper
block:
- name: usersettings - Install pip3
when:
(override_os_family is defined) | ternary(override_os_family,ansible_os_family) != "Darwin" and
(override_os_family is defined) | ternary(override_os_family,ansible_os_family) != "FreeBSD"
become: yes
ignore_errors: yes # just fail on systems without sudo access
ansible.builtin.package:
name: "{{ packages }}"
state: present
vars:
packages:
- python3-pip
- name: usersettings - Install pip virtualenvwrapper (Debian)
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Debian"
become: yes
ansible.builtin.pip:
name: virtualenvwrapper
extra_args: --system
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Debian"
- name: usersettings - Install pip virtualenvwrapper (macOS)
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Darwin"
environment:
PATH: "/usr/local/bin:{{ ansible_env.PATH }}"
ansible.builtin.pip:
name: virtualenvwrapper
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Darwin"
- name: usersettings - Install pip virtualenvwrapper (CentOS, ArchLinux)
when:
(override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Centos" or
(override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Archlinux"
become: yes
ansible.builtin.pip:
name: virtualenvwrapper
when:
(override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Centos" or
(override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Archlinux"
when: usersetup_virtualenvwrapper
- name: usersettings - Copy dotfiles
ansible.builtin.copy:
src: "{{ item.src }}"
@ -79,10 +68,10 @@
src: "{{ role_path }}/templates/_zshrc.j2"
dest: "{{ ansible_user_dir }}/.zshrc"
- name: usersettings - Set global gitconfig
when: usersetup_gitconfig == true
ansible.builtin.template:
src: "{{ role_path }}/templates/_gitconfig.j2"
dest: "{{ ansible_user_dir }}/.gitconfig"
when: usersetup_gitconfig == true
- name: usersettings - Set tmux.conf
ansible.builtin.template:
src: "{{ role_path }}/templates/_tmux.conf.j2"

View file

@ -8,12 +8,12 @@
register: common_usersetup
- name: usersetup - Change login shell to zsh for current user
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
become: yes
ansible.builtin.user:
name: "{{ ansible_user_id }}"
shell: /bin/zsh
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
# TODO: adapt to ArchLinux systems, if needed
# - name: usersetup - Install locales package
@ -23,23 +23,23 @@
# state: present
# - name: usersetup - Setup locale en_US
# when:
# - common_usersetup.stat.exists == false
# become: yes
# ansible.builtin.locale_gen:
# name: en_US.UTF-8
# state: present
# - name: usersetup - Setup locale de_DE
# when:
# - common_usersetup.stat.exists == false
# - name: usersetup - Setup locale de_DE
# become: yes
# ansible.builtin.locale_gen:
# name: de_DE.UTF-8
# state: present
# when:
# - common_usersetup.stat.exists == false
- name: usersetup - Create lockfile
when:
- common_usersetup.stat.exists == false
ansible.builtin.file:
path: .ansbl-common-usersetup
state: touch
when:
- common_usersetup.stat.exists == false

View file

@ -8,12 +8,12 @@
register: common_usersetup
- name: usersetup - Change login shell to zsh for current user
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
become: yes
ansible.builtin.user:
name: "{{ ansible_user_id }}"
shell: /bin/zsh
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
# TODO: adapt to CentOS/ RHEL systems, if needed
# - name: usersetup - Install locales package
@ -23,23 +23,23 @@
# state: present
# - name: usersetup - Setup locale en_US
# when:
# - common_usersetup.stat.exists == false
# become: yes
# ansible.builtin.locale_gen:
# name: en_US.UTF-8
# state: present
# - name: usersetup - Setup locale de_DE
# when:
# - common_usersetup.stat.exists == false
# - name: usersetup - Setup locale de_DE
# become: yes
# ansible.builtin.locale_gen:
# name: de_DE.UTF-8
# state: present
# when:
# - common_usersetup.stat.exists == false
- name: usersetup - Create lockfile
when:
- common_usersetup.stat.exists == false
ansible.builtin.file:
path: .ansbl-common-usersetup
state: touch
when:
- common_usersetup.stat.exists == false

View file

@ -8,16 +8,16 @@
register: common_usersetup
- name: usersetup - Change login shell to zsh for current user
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
become: yes
ansible.builtin.user:
name: "{{ ansible_user_id }}"
shell: /bin/zsh
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
- name: usersetup - Create lockfile
when:
- common_usersetup.stat.exists == false
ansible.builtin.file:
path: .ansbl-common-usersetup
state: touch
when:
- common_usersetup.stat.exists == false

View file

@ -8,12 +8,12 @@
register: common_usersetup
- name: usersetup - Change login shell to zsh for current user
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
become: yes
ansible.builtin.user:
name: "{{ ansible_user_id }}"
shell: /bin/zsh
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
- name: usersetup - Install locales package
become: yes
@ -22,23 +22,23 @@
state: present
- name: usersetup - Setup locale en_US
when:
- common_usersetup.stat.exists == false
become: yes
ansible.builtin.locale_gen:
name: en_US.UTF-8
state: present
- name: usersetup - Setup locale de_DE
when:
- common_usersetup.stat.exists == false
- name: usersetup - Setup locale de_DE
become: yes
ansible.builtin.locale_gen:
name: de_DE.UTF-8
state: present
- name: usersetup - Create lockfile
when:
- common_usersetup.stat.exists == false
- name: usersetup - Create lockfile
ansible.builtin.file:
path: .ansbl-common-usersetup
state: touch
when:
- common_usersetup.stat.exists == false

View file

@ -8,12 +8,12 @@
register: common_usersetup
- name: usersetup - Change login shell to zsh for current user
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
become: yes
ansible.builtin.user:
name: "{{ ansible_user_id }}"
shell: /usr/local/bin/zsh
when:
- common_usersetup.stat.exists == false and usersetup_chsh == true
# - name: usersetup - Install locales package
# become: yes
@ -22,23 +22,23 @@
# state: present
# - name: usersetup - Setup locale en_US
# when:
# - common_usersetup.stat.exists == false
# become: yes
# ansible.builtin.locale_gen:
# name: en_US.UTF-8
# state: present
# - name: usersetup - Setup locale de_DE
# when:
# - common_usersetup.stat.exists == false
# - name: usersetup - Setup locale de_DE
# become: yes
# ansible.builtin.locale_gen:
# name: de_DE.UTF-8
# state: present
# when:
# - common_usersetup.stat.exists == false
- name: usersetup - Create lockfile
when:
- common_usersetup.stat.exists == false
ansible.builtin.file:
path: .ansbl-common-usersetup
state: touch
when:
- common_usersetup.stat.exists == false

View file

@ -1,7 +1,7 @@
{% if gitconfig_name is defined and gitconfig_email is defined %}
[user]
name = {{ gitconfig_name }}
email = {{ gitconfig_email }}
email = {{ gitconfig_email }}
{% endif %}
[core]
excludesfile = ~/.gitignore_global