diff --git a/tasks/devel-Archlinux.yml b/tasks/devel-Archlinux.yml index 9c3790a..b42a818 100644 --- a/tasks/devel-Archlinux.yml +++ b/tasks/devel-Archlinux.yml @@ -1,7 +1,7 @@ --- # Common/Devel: Install and Configure Dev Env - ArchLinux Version -- name: devel - Fonts +- name: Devel - Fonts become: true ansible.builtin.package: name: "{{ packages }}" @@ -9,12 +9,13 @@ vars: packages: - ttf-hack + diff: false # Install Visual Studio Code and Set Basic Configuration -- name: vscode - Basics +- name: VSCode - Basics when: user_vscode == true block: - - name: vscode - Basics - Install + - name: VSCode - Basics - Install become: true ansible.builtin.package: name: "{{ packages }}" @@ -22,7 +23,8 @@ vars: packages: - code - - name: vscode - Basics - Additional dependencies + diff: false + - name: VSCode - Basics - Additional dependencies become: true ansible.builtin.package: name: "{{ packages }}" @@ -30,20 +32,21 @@ vars: packages: - plantuml - - name: vscode - Basics - Create settings directory + diff: false + - name: VSCode - Basics - Create settings directory ansible.builtin.file: path: "{{ ansible_user_dir }}/.config/Code/User" state: directory - - name: vscode - Basics - Copy global settings + - 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" # Dev Env - C/C++ Development Tools -- name: devel - C/C++ +- name: Devel - C/C++ when: user_lang_cpp == true block: - - name: devel - C/C++ - Install developer tools + - name: Devel - C/C++ - Install developer tools become: true ansible.builtin.package: name: "{{ packages }}" @@ -51,15 +54,16 @@ vars: packages: - clang + diff: false # Dev Env - Python Development Tools # all done in vscode.yml # Dev Env - Golang Development Tools -- name: devel - Golang +- name: Devel - Golang when: user_lang_golang == true block: - - name: devel - Golang - Install developer tools + - name: Devel - Golang - Install developer tools become: true ansible.builtin.package: name: "{{ packages }}" @@ -67,12 +71,13 @@ vars: packages: - go + diff: false # Dev Env - LaTeX Distribution -- name: devel - LaTeX +- name: Devel - LaTeX when: user_lang_latex == true block: - - name: devel - LaTeX - Install basic TeX distribution + - name: Devel - LaTeX - Install basic TeX distribution become: true ansible.builtin.package: name: "{{ packages }}" @@ -84,3 +89,4 @@ # - texlive-science # - texlive-fontsextra - biber + diff: false diff --git a/tasks/devel-Darwin.yml b/tasks/devel-Darwin.yml index 7eb6179..e9317d6 100644 --- a/tasks/devel-Darwin.yml +++ b/tasks/devel-Darwin.yml @@ -1,81 +1,84 @@ --- # Common/Devel: Install and Configure Dev Env - macOS Version -- name: devel - Fonts - ansible.builtin.homebrew_cask: +- name: Devel - Fonts + community.general.homebrew_cask: name: homebrew/cask-fonts/font-hack state: present # Install Visual Studio Code and Set Basic Configuration -- name: vscode - Basics +- name: VSCode - Basics when: user_vscode == true block: - - name: vscode - Basics - Install - ansible.builtin.homebrew_cask: + - name: VSCode - Basics - Install + community.general.homebrew_cask: name: "{{ packages }}" state: present vars: packages: - visual-studio-code - # - name: vscode - Basics - Additional dependencies (1) - # ansible.builtin.homebrew_cask: + # - name: VSCode - Basics - Additional dependencies (1) + # community.general.homebrew_cask: # name: "{{ packages }}" # state: present # vars: # packages: # - java # TODO: needs user password! - # - name: vscode - Basics - Additional dependencies (2) - # ansible.builtin.homebrew: + # - name: VSCode - Basics - Additional dependencies (2) + # community.general.homebrew: # name: "{{ packages }}" # state: present # vars: # packages: # - graphviz - - name: vscode - Basics - Create settings directory + - name: VSCode - Basics - Create settings directory ansible.builtin.file: path: "{{ ansible_user_dir }}/Library/Application Support/Code/User" state: directory - - name: vscode - Basics - Copy global settings + - 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" # Dev Env - C/C++ Development Tools -- name: devel - C/C++ +- name: Devel - C/C++ when: user_lang_cpp == true block: - - name: devel - C/C++ - Install developer tools - ansible.builtin.homebrew: + - name: Devel - C/C++ - Install developer tools + community.general.homebrew: name: "{{ packages }}" state: present vars: packages: - clang-format + diff: false # Dev Env - Python Development Tools # all done in vscode.yml # Dev Env - Golang Development Tools -- name: devel - Golang +- name: Devel - Golang when: user_lang_golang == true block: - - name: devel - Golang - Install developer tools - ansible.builtin.homebrew: + - name: Devel - Golang - Install developer tools + community.general.homebrew: name: "{{ packages }}" state: present vars: packages: - go + diff: false # Dev Env - LaTeX Distribution -- name: devel - LaTeX +- name: Devel - LaTeX when: user_vscode == true and user_lang_latex == true block: - - name: devel - LaTeX - Install basic TeX distribution - ansible.builtin.homebrew_cask: + - name: Devel - LaTeX - Install basic TeX distribution + community.general.homebrew_cask: name: "{{ packages }}" state: present vars: packages: - basictex - tex-live-utility + diff: false diff --git a/tasks/devel-Debian.yml b/tasks/devel-Debian.yml index 2e8a09a..3f7fee5 100644 --- a/tasks/devel-Debian.yml +++ b/tasks/devel-Debian.yml @@ -1,37 +1,39 @@ --- # Common/Devel: Install and Configure Dev Env - Debian Version -- name: devel - Fonts - become: yes +- name: Devel - Fonts + become: true ansible.builtin.apt: name: fonts-hack-ttf state: present + diff: false # Install Visual Studio Code and Set Basic Configuration -- name: vscode - Basics +- name: VSCode - Basics when: user_vscode == true block: - - name: vscode - Basics - Add Repo Key - become: yes + - name: VSCode - Basics - Add Repo Key + become: true ansible.builtin.apt_key: url: "https://packages.microsoft.com/keys/microsoft.asc" state: present - - name: vscode - Basics - Add Repo - become: yes + - name: VSCode - Basics - Add Repo + become: true ansible.builtin.apt_repository: repo: "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" filename: vscode state: present - - name: vscode - Basics - Install - become: yes + - name: VSCode - Basics - Install + become: true ansible.builtin.package: name: "{{ packages }}" state: present vars: packages: - code - - name: vscode - Basics - Additional dependencies - become: yes + diff: false + - name: VSCode - Basics - Additional dependencies + become: true ansible.builtin.package: name: "{{ packages }}" state: present @@ -39,49 +41,52 @@ packages: - plantuml - graphviz - - name: vscode - Basics - Create settings directory + diff: false + - name: VSCode - Basics - Create settings directory ansible.builtin.file: path: "{{ ansible_user_dir }}/.config/Code/User" state: directory - - name: vscode - Basics - Copy global settings + - 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" # Dev Env - C/C++ Development Tools -- name: devel - C/C++ +- name: Devel - C/C++ when: user_lang_cpp == true block: - - name: devel - C/C++ - Install developer tools - become: yes + - name: Devel - C/C++ - Install developer tools + become: true ansible.builtin.package: name: "{{ packages }}" state: present vars: packages: - clang-format + diff: false # Dev Env - Python Development Tools # all done in vscode.yml # Dev Env - Golang Development Tools -- name: devel - Golang +- name: Devel - Golang when: user_lang_golang == true block: - - name: devel - Golang - Install developer tools - become: yes + - name: Devel - Golang - Install developer tools + become: true ansible.builtin.apt: name: "{{ packages }}" state: present vars: packages: - golang + diff: false # Dev Env - LaTeX Distribution -- name: devel - LaTeX +- name: Devel - LaTeX when: user_lang_latex == true block: - - name: devel - LaTeX - Install basic TeX distribution + - name: Devel - LaTeX - Install basic TeX distribution ansible.builtin.package: name: "{{ packages }}" state: present @@ -92,3 +97,4 @@ # - texlive-science # - texlive-fonts-extra - biber + diff: false diff --git a/tasks/devel.yml b/tasks/devel.yml index 7f86d86..c9b3501 100644 --- a/tasks/devel.yml +++ b/tasks/devel.yml @@ -13,17 +13,17 @@ # - user_lang_golang_gopath: Go workspace directory # - user_lang_latex: Boolean for LaTeX -- name: vscode - Install and configure VS Code +- name: VSCode - Install and configure VS Code ansible.builtin.include_tasks: "{{ item }}" with_first_found: - "devel-{{ ansible_distribution }}.yml" - "devel-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml" # Install Visual Studio Code and Set Basic Configuration -- name: vscode - Basics +- name: VSCode - Basics when: user_vscode == true block: - - name: vscode - Basics - Configure + - name: VSCode - Basics - Configure ansible.builtin.shell: | PATH=/usr/local/bin:$PATH code --install-extension chiehyu.vscode-astyle @@ -36,10 +36,10 @@ code --install-extension grapecity.gc-excelviewer # VS Code - C/C++ Development Tools -- name: vscode - C/C++ +- name: VSCode - C/C++ when: user_vscode == true and user_lang_cpp == true block: - - name: vscode - C/C++ - Configure VS Code + - name: VSCode - C/C++ - Configure VS Code ansible.builtin.shell: | PATH=/usr/local/bin:$PATH code --install-extension ms-vscode.cpptools @@ -47,71 +47,71 @@ code --install-extension twxs.cmake # VS Code - Python Development Tools -- name: devel - Python - Install python dev packages +- 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) }}" -- name: vscode - Python +- name: VSCode - Python when: user_vscode == true and user_lang_python == true block: - - name: vscode - Python - Configure VS Code + - name: VSCode - Python - Configure VS Code ansible.builtin.shell: | PATH=/usr/local/bin:$PATH code --install-extension ms-python.python # VC Code - Golang Development Tools # https://golang.org/doc/install -- name: devel - Golang - Setup Environment +- name: Devel - Golang - Setup Environment when: user_lang_golang == true block: - - name: devel - Golang - Create workspace directory + - name: Devel - Golang - Create workspace directory ansible.builtin.file: path: "{{ user_lang_golang_gopath }}" state: directory - - name: devel - Golang - Create zshrc-host + - name: Devel - Golang - Create zshrc-host ansible.builtin.file: path: "{{ ansible_user_dir }}/.zshrc-host" state: touch - - name: devel - Golang - Add GOPATH + - name: Devel - Golang - Add GOPATH ansible.builtin.lineinfile: path: "{{ ansible_user_dir }}/.zshrc-host" line: "export GOPATH={{ user_lang_golang_gopath }}" state: present - backup: yes - - name: devel - Golang - Add go bin to PATH + backup: true + - name: Devel - Golang - Add go bin to PATH ansible.builtin.lineinfile: path: "{{ ansible_user_dir }}/.zshrc-host" line: "export PATH=$PATH:{{ user_lang_golang_gopath }}/bin" state: present - backup: yes + backup: true # TODO: make this resilient against changes # 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 block: - - name: vscode - Golang - Configure VS Code + - name: VSCode - Golang - Configure VS Code ansible.builtin.shell: | PATH=/usr/local/bin:$PATH code --install-extension golang.go # VS Code - LaTeX Distribution -- name: devel - LaTeX - Install TeX packages +- name: Devel - LaTeX - Install TeX packages when: user_lang_latex == true - become: yes + become: true ansible.builtin.shell: | PATH=/Library/TeX/texbin:$PATH tlmgr update --self 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 hyphenat -- name: vscode - LaTeX +- name: VSCode - LaTeX when: user_vscode == true and user_lang_latex == true block: - - name: vscode - Basics - Configure + - name: VSCode - Basics - Configure ansible.builtin.shell: | PATH=/usr/local/bin:$PATH code --install-extension james-yu.latex-workshop diff --git a/tasks/essentials-Archlinux.yml b/tasks/essentials-Archlinux.yml index 7809063..02b0b48 100644 --- a/tasks/essentials-Archlinux.yml +++ b/tasks/essentials-Archlinux.yml @@ -1,8 +1,8 @@ --- # Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - ArchLinux Version -- name: essentials - Install essential utilities - become: yes +- name: Essentials - Install essential utilities + become: true ansible.builtin.package: name: "{{ packages }}" state: present @@ -15,3 +15,4 @@ - vim - tmux - python-pip + diff: false diff --git a/tasks/essentials-Centos.yml b/tasks/essentials-Centos.yml index 8c55ce3..8d0c3f2 100644 --- a/tasks/essentials-Centos.yml +++ b/tasks/essentials-Centos.yml @@ -1,8 +1,8 @@ --- # Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - CentOS Version -- name: essentials - Install essential utilities - become: yes +- name: Essentials - Install essential utilities + become: true ansible.builtin.yum: name: "{{ packages }}" state: present @@ -13,14 +13,15 @@ - zsh - vim - tmux + diff: false -- name: essentials - Install pip - Activate EPEL - become: yes +- name: Essentials - Install pip - Activate EPEL + become: true ansible.builtin.yum: name: epel-release state: present -- name: essentials - Install pip - Install - become: yes +- name: Essentials - Install pip - Install + become: true ansible.builtin.yum: name: python-pip state: present diff --git a/tasks/essentials-Darwin.yml b/tasks/essentials-Darwin.yml index 979c659..d6c06f0 100644 --- a/tasks/essentials-Darwin.yml +++ b/tasks/essentials-Darwin.yml @@ -1,7 +1,7 @@ --- # Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - macOS Version -- name: essentials - Install essential utilities +- name: Essentials - Install essential utilities ansible.builtin.package: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - vim - tmux - python # includes pip + diff: false diff --git a/tasks/essentials-Debian.yml b/tasks/essentials-Debian.yml index 469eb2f..027642a 100644 --- a/tasks/essentials-Debian.yml +++ b/tasks/essentials-Debian.yml @@ -1,12 +1,12 @@ --- # Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - Debian Version -- name: essentials - Install essential utilities - become: yes +- name: Essentials - Install essential utilities + become: true ansible.builtin.apt: name: "{{ packages }}" state: present - update_cache: yes + update_cache: true vars: packages: - git @@ -16,3 +16,4 @@ - vim - tmux - python3-pip + diff: false diff --git a/tasks/essentials-FreeBSD.yml b/tasks/essentials-FreeBSD.yml index c7194e7..643df03 100644 --- a/tasks/essentials-FreeBSD.yml +++ b/tasks/essentials-FreeBSD.yml @@ -1,8 +1,8 @@ --- # Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - FreeBSD Version -- name: essentials - Install essential utilities - become: yes +- name: Essentials - Install essential utilities + become: true ansible.builtin.package: name: "{{ packages }}" state: present @@ -15,3 +15,4 @@ - vim - tmux - python3 + diff: false diff --git a/tasks/essentials.yml b/tasks/essentials.yml index 13638c3..22866c3 100644 --- a/tasks/essentials.yml +++ b/tasks/essentials.yml @@ -1,8 +1,8 @@ --- # Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) -- name: essentials - Install essential utilities +- name: Essentials - Install essential utilities ansible.builtin.include_tasks: "{{ item }}" with_first_found: - "essentials-{{ ansible_distribution }}.yml" - - "essentials-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml" + - "essentials-{{ (override_os_family is defined) | ternary(override_os_family, ansible_os_family) }}.yml" diff --git a/tasks/main.yml b/tasks/main.yml index 0712a6c..f4df38c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,17 +10,17 @@ # if role has not changed, this will not be needed when just installing updates - name: Install essential tools - when: common_settingsonly | default(false) == false + when: not (common_settingsonly | default(false)) ansible.builtin.include_tasks: essentials.yml # if role has not changed, this will not be needed when just installing updates - name: Install more tools - when: common_settingsonly | default(false) == false + when: not (common_settingsonly | default(false)) ansible.builtin.include_tasks: tools.yml # this will just run once, because of a lock-file - name: Basics - Setup user shell - when: common_settingsonly | default(false) == false + when: not (common_settingsonly | default(false)) ansible.builtin.include_tasks: usersetup.yml # run this for every maintenance/ update cycle diff --git a/tasks/tools-Archlinux.yml b/tasks/tools-Archlinux.yml index 471672e..f10d156 100644 --- a/tasks/tools-Archlinux.yml +++ b/tasks/tools-Archlinux.yml @@ -2,8 +2,8 @@ # Common/Tools: Additional Tools (depending on OS) - ArchLinux Version # (bind-tools includes dig) -- name: tools - Install basic utilities - become: yes +- name: Tools - Install basic utilities + become: true ansible.builtin.package: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - bind-tools - htop - unzip + diff: false diff --git a/tasks/tools-Centos.yml b/tasks/tools-Centos.yml index 09acbfc..32ab79b 100644 --- a/tasks/tools-Centos.yml +++ b/tasks/tools-Centos.yml @@ -2,8 +2,8 @@ # Common/Tools: Additional Tools (depending on OS) - CentOS Version # (bind-utils includes dig) -- name: tools - Install basic utilities - become: yes +- name: Tools - Install basic utilities + become: true ansible.builtin.yum: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - bind-utils - htop - unzip + diff: false diff --git a/tasks/tools-Darwin.yml b/tasks/tools-Darwin.yml index 4854855..f4226b4 100644 --- a/tasks/tools-Darwin.yml +++ b/tasks/tools-Darwin.yml @@ -1,11 +1,12 @@ --- # Common/Tools: Additional Tools (depending on OS) - macOS Version -- name: tools - Install basic utilities - ansible.builtin.homebrew: +- name: Tools - Install basic utilities + community.general.homebrew: name: "{{ packages }}" state: present - update_homebrew: yes + update_homebrew: true vars: packages: - rsync + diff: false diff --git a/tasks/tools-Debian.yml b/tasks/tools-Debian.yml index 3e76d80..e16da83 100644 --- a/tasks/tools-Debian.yml +++ b/tasks/tools-Debian.yml @@ -2,8 +2,8 @@ # Common/Tools: Additional Tools (depending on OS) - Debian Version # (dnsutils includes dig) -- name: tools - Install basic utilities - become: yes +- name: Tools - Install basic utilities + become: true ansible.builtin.apt: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - dnsutils - htop - unzip + diff: false diff --git a/tasks/tools-FreeBSD.yml b/tasks/tools-FreeBSD.yml index 835f2b2..fa3188d 100644 --- a/tasks/tools-FreeBSD.yml +++ b/tasks/tools-FreeBSD.yml @@ -2,8 +2,8 @@ # Common/Tools: Additional Tools (depending on OS) - FreeBSD Version # (bind-tools includes dig) -- name: tools - Install basic utilities - become: yes +- name: Tools - Install basic utilities + become: true ansible.builtin.package: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - bind-tools - htop - unzip + diff: false diff --git a/tasks/tools.yml b/tasks/tools.yml index b651d6e..acaf647 100644 --- a/tasks/tools.yml +++ b/tasks/tools.yml @@ -1,8 +1,8 @@ --- # Common/Tools: Additional Tools (depending on OS) (rsync; dnsutils, htop, unzip) -- name: tools - Install basic utilities +- name: Tools - Install basic utilities ansible.builtin.include_tasks: "{{ item }}" with_first_found: - "tools-{{ ansible_distribution }}.yml" - - "tools-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml" + - "tools-{{ (override_os_family is defined) | ternary(override_os_family, ansible_os_family) }}.yml" diff --git a/tasks/update-Centos.yml b/tasks/update-Centos.yml index 201c899..3e017a2 100644 --- a/tasks/update-Centos.yml +++ b/tasks/update-Centos.yml @@ -1,9 +1,9 @@ --- # Common/Update: Install All Updates - CentOS Version -- name: update - Update and upgrade all packages - become: yes +- name: Update - Update and upgrade all packages + become: true ansible.builtin.yum: name: "*" state: latest - update_cache: yes + update_cache: true diff --git a/tasks/update-Darwin.yml b/tasks/update-Darwin.yml index 7ee6fbe..421a6a7 100644 --- a/tasks/update-Darwin.yml +++ b/tasks/update-Darwin.yml @@ -1,7 +1,7 @@ --- # Common/Update: Install All Updates - macOS Version -- name: update - Update and upgrade all packages - ansible.builtin.homebrew: - update_homebrew: yes - upgrade_all: yes +- name: Update - Update and upgrade all packages + community.general.homebrew: + update_homebrew: true + upgrade_all: true diff --git a/tasks/update-Debian.yml b/tasks/update-Debian.yml index 3bc62bb..fcdbb12 100644 --- a/tasks/update-Debian.yml +++ b/tasks/update-Debian.yml @@ -1,12 +1,12 @@ --- # Common/Update: Install All Updates - Debian Version -- name: update - Update and upgrade all packages - become: yes +- name: Update - Update and upgrade all packages + become: true ansible.builtin.apt: force_apt_get: true name: "*" state: latest - update_cache: yes - autoclean: yes - autoremove: yes + update_cache: true + autoclean: true + autoremove: true diff --git a/tasks/update.yml b/tasks/update.yml index 3674058..5b2eb19 100644 --- a/tasks/update.yml +++ b/tasks/update.yml @@ -1,9 +1,9 @@ --- # Common/Update: Install All Updates -- name: update - Update and upgrade all packages +- name: Update - Update and upgrade all packages ansible.builtin.include_tasks: "{{ item }}" with_first_found: - "update-{{ ansible_distribution }}.yml" - - "update-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml" + - "update-{{ (override_os_family is defined) | ternary(override_os_family, ansible_os_family) }}.yml" ignore_errors: true diff --git a/tasks/usersettings.yml b/tasks/usersettings.yml index e6e7f93..f5c3c8a 100644 --- a/tasks/usersettings.yml +++ b/tasks/usersettings.yml @@ -1,7 +1,7 @@ --- # Common/Usersettings: Universial Dotfiles. Update regularly. -- name: usersettings - Install required tools +- name: Usersettings - Install required tools become: true ignore_errors: true # just fail on systems without sudo access ansible.builtin.package: @@ -10,26 +10,30 @@ vars: packages: - git + diff: false -- name: usersettings - Install/ Update oh-my-zsh for current user +- name: Usersettings - Install/ Update oh-my-zsh for current user ansible.builtin.git: repo: https://github.com/robbyrussell/oh-my-zsh.git dest: "{{ ansible_user_dir }}/.oh-my-zsh" + diff: false -- name: usersettings - Install/ Update fzf sources +- name: Usersettings - Install/ Update fzf sources ansible.builtin.git: repo: https://github.com/junegunn/fzf.git dest: "{{ ansible_user_dir }}/.fzf" register: fzf_git + diff: false - name: (Re-)Install fzf when: - fzf_git.after != fzf_git.before ansible.builtin.shell: ".fzf/install --key-bindings --no-completion --no-update-rc" -- name: usersettings - Install pip virtualenvwrapper +- name: Usersettings - Install pip virtualenvwrapper when: usersetup_virtualenvwrapper + diff: false block: - - name: usersettings - Install pip3 + - 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" @@ -41,26 +45,27 @@ vars: packages: - python3-pip - - name: usersettings - Install pip virtualenvwrapper (Debian) + diff: false + - name: Usersettings - Install pip virtualenvwrapper (Debian) when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Debian" become: true ansible.builtin.pip: name: virtualenvwrapper extra_args: --system - - name: usersettings - Install pip virtualenvwrapper (macOS) + - 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 - - name: usersettings - Install pip virtualenvwrapper (CentOS, ArchLinux) + - 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: true ansible.builtin.pip: name: virtualenvwrapper -- name: usersettings - Copy dotfiles +- name: Usersettings - Copy dotfiles ansible.builtin.copy: src: "{{ item.src }}" dest: "{{ item.dest }}" @@ -77,13 +82,13 @@ src: "{{ role_path }}/files/_oh-my-zsh/jtbx.zsh-theme", dest: "{{ ansible_user_dir }}/.oh-my-zsh/custom/themes/jtbx.zsh-theme", } -- name: usersettings - Create some directories +- name: Usersettings - Create some directories ansible.builtin.file: path: "{{ item }}" state: directory with_items: - "{{ ansible_user_dir }}/.config/htop/" -- name: usersettings - Set templated dotfiles +- name: Usersettings - Set templated dotfiles ansible.builtin.template: src: "{{ item.src }}" dest: "{{ item.dest }}" @@ -93,41 +98,41 @@ - { src: "{{ role_path }}/templates/_zshrc.j2", dest: "{{ ansible_user_dir }}/.zshrc", - force: yes, + force: true, } - { src: "{{ role_path }}/templates/_tmux.conf.j2", dest: "{{ ansible_user_dir }}/.tmux.conf", - force: yes, + force: true, } - { src: "{{ role_path }}/templates/_vimrc.j2", dest: "{{ ansible_user_dir }}/.vimrc", - force: yes, + force: true, } - { src: "{{ role_path }}/templates/htoprc.j2", dest: "{{ ansible_user_dir }}/.config/htop/htoprc", force: no, } -- name: usersettings - Set global gitconfig +- name: Usersettings - Set global gitconfig when: usersetup_gitconfig == true ansible.builtin.template: src: "{{ role_path }}/templates/_gitconfig.j2" dest: "{{ ansible_user_dir }}/.gitconfig" -- name: usersettings - Vim Plugings +- name: Usersettings - Vim Plugings when: usersetup_vimplugins == true block: - - name: usersettings - Create .vim directory + - name: Usersettings - Create .vim directory ansible.builtin.file: path: "{{ ansible_user_dir }}/.vim/autoload" state: directory - - name: usersettings - Install vim plugin manager + - name: Usersettings - Install vim plugin manager ansible.builtin.get_url: url: https://tpo.pe/pathogen.vim dest: "{{ ansible_user_dir }}/.vim/autoload/pathogen.vim" - - name: usersettings - Install vim plugins + - name: Usersettings - Install vim plugins ansible.builtin.git: repo: "{{ item.repo }}" dest: "{{ item.dest }}" @@ -152,3 +157,4 @@ repo: "https://github.com/tpope/vim-commentary", dest: "{{ ansible_user_dir }}/.vim/bundle/vim-commentary", } +# TODO: https://github.com/jan-warchol/selenized diff --git a/tasks/usersetup-Archlinux.yml b/tasks/usersetup-Archlinux.yml index 8b5b543..2b728c0 100644 --- a/tasks/usersetup-Archlinux.yml +++ b/tasks/usersetup-Archlinux.yml @@ -2,42 +2,43 @@ # Common/Usersetup: Auto-setup a user shell and prepare dotfiles - ArchLinux Version # Will run once per user, because of lockfile `~/.ansbl-common-usersetup` -- name: usersetup - Check, if usersetup already ran +- name: Usersetup - Check, if usersetup already ran ansible.builtin.stat: path: "{{ ansible_user_dir }}/.ansbl-common-usersetup" register: common_usersetup -- name: usersetup - Change login shell to zsh for current user +- name: Usersetup - Change login shell to zsh for current user when: - common_usersetup.stat.exists == false and usersetup_chsh == true - become: yes + become: true ansible.builtin.user: name: "{{ ansible_user_id }}" shell: /bin/zsh # TODO: adapt to ArchLinux systems, if needed -# - name: usersetup - Install locales package -# become: yes +# - name: Usersetup - Install locales package +# become: true # ansible.builtin.apt: # name: locales # state: present +# diff: false -# - name: usersetup - Setup locale en_US +# - name: Usersetup - Setup locale en_US # when: # - common_usersetup.stat.exists == false -# become: yes +# become: true # ansible.builtin.locale_gen: # name: en_US.UTF-8 # state: present -# - name: usersetup - Setup locale de_DE +# - name: Usersetup - Setup locale de_DE # when: # - common_usersetup.stat.exists == false -# become: yes +# become: true # ansible.builtin.locale_gen: # name: de_DE.UTF-8 # state: present -- name: usersetup - Create lockfile +- name: Usersetup - Create lockfile when: - common_usersetup.stat.exists == false ansible.builtin.file: diff --git a/tasks/usersetup-Centos.yml b/tasks/usersetup-Centos.yml index 9cf1e32..a26d477 100644 --- a/tasks/usersetup-Centos.yml +++ b/tasks/usersetup-Centos.yml @@ -2,42 +2,43 @@ # Common/Usersetup: Auto-setup a user shell and prepare dotfiles - CentOS Version # Will run once per user, because of lockfile `~/.ansbl-common-usersetup` -- name: usersetup - Check, if usersetup already ran +- name: Usersetup - Check, if usersetup already ran ansible.builtin.stat: path: "{{ ansible_user_dir }}/.ansbl-common-usersetup" register: common_usersetup -- name: usersetup - Change login shell to zsh for current user +- name: Usersetup - Change login shell to zsh for current user when: - common_usersetup.stat.exists == false and usersetup_chsh == true - become: yes + become: true ansible.builtin.user: name: "{{ ansible_user_id }}" shell: /bin/zsh # TODO: adapt to CentOS/ RHEL systems, if needed -# - name: usersetup - Install locales package -# become: yes +# - name: Usersetup - Install locales package +# become: true # ansible.builtin.apt: # name: locales # state: present +# diff: false -# - name: usersetup - Setup locale en_US +# - name: Usersetup - Setup locale en_US # when: # - common_usersetup.stat.exists == false -# become: yes +# become: true # ansible.builtin.locale_gen: # name: en_US.UTF-8 # state: present -# - name: usersetup - Setup locale de_DE +# - name: Usersetup - Setup locale de_DE # when: # - common_usersetup.stat.exists == false -# become: yes +# become: true # ansible.builtin.locale_gen: # name: de_DE.UTF-8 # state: present -- name: usersetup - Create lockfile +- name: Usersetup - Create lockfile when: - common_usersetup.stat.exists == false ansible.builtin.file: diff --git a/tasks/usersetup-Darwin.yml b/tasks/usersetup-Darwin.yml index 3fac8f1..9c6b697 100644 --- a/tasks/usersetup-Darwin.yml +++ b/tasks/usersetup-Darwin.yml @@ -2,20 +2,20 @@ # Common/Usersetup: Auto-setup a user shell and prepare dotfiles - macOS Version # Will run once per user, because of lockfile `~/.ansbl-common-usersetup` -- name: usersetup - Check, if usersetup already ran +- name: Usersetup - Check, if usersetup already ran ansible.builtin.stat: path: "{{ ansible_user_dir }}/.ansbl-common-usersetup" register: common_usersetup -- name: usersetup - Change login shell to zsh for current user +- name: Usersetup - Change login shell to zsh for current user when: - common_usersetup.stat.exists == false and usersetup_chsh == true - become: yes + become: true ansible.builtin.user: name: "{{ ansible_user_id }}" shell: /bin/zsh -- name: usersetup - Create lockfile +- name: Usersetup - Create lockfile when: - common_usersetup.stat.exists == false ansible.builtin.file: diff --git a/tasks/usersetup-Debian.yml b/tasks/usersetup-Debian.yml index 3c04fd2..5d6dfef 100644 --- a/tasks/usersetup-Debian.yml +++ b/tasks/usersetup-Debian.yml @@ -2,41 +2,42 @@ # Common/Usersetup: Auto-setup a user shell and prepare dotfiles - Debian Version # Will run once per user, because of lockfile `~/.ansbl-common-usersetup` -- name: usersetup - Check, if usersetup already ran +- name: Usersetup - Check, if usersetup already ran ansible.builtin.stat: path: "{{ ansible_user_dir }}/.ansbl-common-usersetup" register: common_usersetup -- name: usersetup - Change login shell to zsh for current user +- name: Usersetup - Change login shell to zsh for current user when: - common_usersetup.stat.exists == false and usersetup_chsh == true - become: yes + become: true ansible.builtin.user: name: "{{ ansible_user_id }}" shell: /bin/zsh -- name: usersetup - Install locales package - become: yes +- name: Usersetup - Install locales package + become: true ansible.builtin.apt: name: locales state: present + diff: false -- name: usersetup - Setup locale en_US +- name: Usersetup - Setup locale en_US when: - common_usersetup.stat.exists == false - become: yes + become: true ansible.builtin.locale_gen: name: en_US.UTF-8 state: present -- name: usersetup - Setup locale de_DE +- name: Usersetup - Setup locale de_DE when: - common_usersetup.stat.exists == false - become: yes + become: true ansible.builtin.locale_gen: name: de_DE.UTF-8 state: present -- name: usersetup - Create lockfile +- name: Usersetup - Create lockfile when: - common_usersetup.stat.exists == false ansible.builtin.file: diff --git a/tasks/usersetup-FreeBSD.yml b/tasks/usersetup-FreeBSD.yml index 1575545..420d82b 100644 --- a/tasks/usersetup-FreeBSD.yml +++ b/tasks/usersetup-FreeBSD.yml @@ -2,41 +2,42 @@ # Common/Usersetup: Auto-setup a user shell and prepare dotfiles - FreeBSD Version # Will run once per user, because of lockfile `~/.ansbl-common-usersetup` -- name: usersetup - Check, if usersetup already ran +- name: Usersetup - Check, if usersetup already ran ansible.builtin.stat: path: "{{ ansible_user_dir }}/.ansbl-common-usersetup" register: common_usersetup -- name: usersetup - Change login shell to zsh for current user +- name: Usersetup - Change login shell to zsh for current user when: - common_usersetup.stat.exists == false and usersetup_chsh == true - become: yes + become: true ansible.builtin.user: name: "{{ ansible_user_id }}" shell: /usr/local/bin/zsh -# - name: usersetup - Install locales package -# become: yes +# - name: Usersetup - Install locales package +# become: true # ansible.builtin.apt: # name: locales # state: present +# diff: false -# - name: usersetup - Setup locale en_US +# - name: Usersetup - Setup locale en_US # when: # - common_usersetup.stat.exists == false -# become: yes +# become: true # ansible.builtin.locale_gen: # name: en_US.UTF-8 # state: present -# - name: usersetup - Setup locale de_DE +# - name: Usersetup - Setup locale de_DE # when: # - common_usersetup.stat.exists == false -# become: yes +# become: true # ansible.builtin.locale_gen: # name: de_DE.UTF-8 # state: present -- name: usersetup - Create lockfile +- name: Usersetup - Create lockfile when: - common_usersetup.stat.exists == false ansible.builtin.file: diff --git a/tasks/usersetup.yml b/tasks/usersetup.yml index c27a5ea..06667f8 100644 --- a/tasks/usersetup.yml +++ b/tasks/usersetup.yml @@ -2,8 +2,8 @@ # Common/Usersetup: Auto-setup a user shell and prepare dotfiles. # Will run once per user, because of lockfile `~/.ansbl-common-usersetup` -- name: usersetup - Run setup tasks +- name: Usersetup - Run setup tasks ansible.builtin.include_tasks: "{{ item }}" with_first_found: - "usersetup-{{ ansible_distribution }}.yml" - - "usersetup-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml" + - "usersetup-{{ (override_os_family is defined) | ternary(override_os_family, ansible_os_family) }}.yml" diff --git a/tasks/usertools-Archlinux.yml b/tasks/usertools-Archlinux.yml index 5542284..14f5bd6 100644 --- a/tasks/usertools-Archlinux.yml +++ b/tasks/usertools-Archlinux.yml @@ -1,8 +1,8 @@ --- # Common/Usertools: User's Main Machine/ Developer Tools - ArchLinux Version -- name: usertools - Install user's working utilities - become: yes +- name: Usertools - Install user's working utilities + become: true ansible.builtin.package: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - icdiff - iftop - ansible + diff: false diff --git a/tasks/usertools-Centos.yml b/tasks/usertools-Centos.yml index 44f3a1a..a2689c5 100644 --- a/tasks/usertools-Centos.yml +++ b/tasks/usertools-Centos.yml @@ -1,8 +1,8 @@ --- # Common/Usertools: User's Main Machine/ Developer Tools - CentOS Version -- name: usertools - Install user's working utilities - become: yes +- name: Usertools - Install user's working utilities + become: true ansible.builtin.yum: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - icdiff - iftop - ansible + diff: false diff --git a/tasks/usertools-Darwin.yml b/tasks/usertools-Darwin.yml index 596c012..82ead14 100644 --- a/tasks/usertools-Darwin.yml +++ b/tasks/usertools-Darwin.yml @@ -1,7 +1,7 @@ --- # Common/Usertools: User's Main Machine/ Developer Tools - macOS Version -- name: usertools - Install user's working utilities +- name: Usertools - Install user's working utilities ansible.builtin.package: name: "{{ packages }}" state: present @@ -12,3 +12,4 @@ - icdiff - iftop - ansible + diff: false diff --git a/tasks/usertools-Debian.yml b/tasks/usertools-Debian.yml index 13b080f..d61847e 100644 --- a/tasks/usertools-Debian.yml +++ b/tasks/usertools-Debian.yml @@ -1,8 +1,8 @@ --- # Common/Usertools: User's Main Machine/ Developer Tools - Debian Version -- name: usertools - Install user's working utilities - become: yes +- name: Usertools - Install user's working utilities + become: true ansible.builtin.apt: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - icdiff - iftop - ansible + diff: false diff --git a/tasks/usertools-FreeBSD.yml b/tasks/usertools-FreeBSD.yml index 92fe6ae..8ea19f9 100644 --- a/tasks/usertools-FreeBSD.yml +++ b/tasks/usertools-FreeBSD.yml @@ -1,8 +1,8 @@ --- # Common/Usertools: User's Main Machine/ Developer Tools - FreeBSD Version -- name: usertools - Install user's working utilities - become: yes +- name: Usertools - Install user's working utilities + become: true ansible.builtin.package: name: "{{ packages }}" state: present @@ -13,3 +13,4 @@ - icdiff - iftop #- ansible + diff: false diff --git a/tasks/usertools.yml b/tasks/usertools.yml index 3f0e449..b91d4a2 100644 --- a/tasks/usertools.yml +++ b/tasks/usertools.yml @@ -1,7 +1,7 @@ --- # Common/Usertools: User's Main Machine/ Developer Tools (nmap, rsync, icdiff, iftop, ansible) -- name: usertools - Install user's working utilities +- name: Usertools - Install user's working utilities ansible.builtin.include_tasks: "{{ item }}" with_first_found: - "usertools-{{ ansible_distribution }}.yml"