[TIDY] Update to ansible 4 module names
This commit is contained in:
parent
a384c4385a
commit
9f7fa75980
16
README.md
16
README.md
|
@ -59,7 +59,7 @@ You can simply run the whole role:
|
|||
- name: Basic User Shell Setup
|
||||
hosts: all
|
||||
tasks:
|
||||
- import_role:
|
||||
- ansible.builtin.import_role:
|
||||
name: common
|
||||
```
|
||||
|
||||
|
@ -69,39 +69,39 @@ Or call the different tasks individually:
|
|||
hosts: all
|
||||
tasks:
|
||||
- name: Basics - Update first
|
||||
include_role:
|
||||
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
|
||||
include_role:
|
||||
ansible.builtin.import_role:
|
||||
name: common
|
||||
tasks_from: essentials
|
||||
when: common_settingsonly | default(false) == false
|
||||
- name: Basics - Install basic tools
|
||||
include_role:
|
||||
ansible.builtin.import_role:
|
||||
name: common
|
||||
tasks_from: tools
|
||||
when: common_settingsonly | default(false) == false
|
||||
- name: Basics - Setup user shell
|
||||
include_role:
|
||||
ansible.builtin.import_role:
|
||||
name: common
|
||||
tasks_from: usersetup
|
||||
when: common_settingsonly | default(false) == false
|
||||
- name: Basics - Install dotfiles
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: common
|
||||
tasks_from: usersettings
|
||||
|
||||
## Additionall tasks for a work station machine
|
||||
- name: Basics - Install user's working utilities
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: common
|
||||
tasks_from: usertools
|
||||
- name: Basics - Install and configure development env (and VS Code)
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: common
|
||||
tasks_from: devel
|
||||
```
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Devel: Install and Configure Dev Env - ArchLinux Version
|
||||
|
||||
- name: devel - Fonts
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -13,25 +13,25 @@
|
|||
- name: vscode - Basics
|
||||
block:
|
||||
- name: vscode - Basics - Install
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
- code
|
||||
- name: vscode - Basics - Additional dependencies
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
- plantuml
|
||||
- name: vscode - Basics - Create settings directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_user_dir }}/.config/Code/User"
|
||||
state: directory
|
||||
- name: vscode - Basics - Copy global settings
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ role_path }}/files/vscode-settings.json"
|
||||
dest: "{{ ansible_user_dir }}/.config/Code/User/settings.json"
|
||||
when: user_vscode == true
|
||||
|
@ -40,7 +40,7 @@
|
|||
- name: devel - C/C++
|
||||
block:
|
||||
- name: devel - C/C++ - Install developer tools
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -55,7 +55,7 @@
|
|||
- name: devel - Golang
|
||||
block:
|
||||
- name: devel - Golang - Install developer tools
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -67,7 +67,7 @@
|
|||
- name: devel - LaTeX
|
||||
block:
|
||||
- name: devel - LaTeX - Install basic TeX distribution
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Devel: Install and Configure Dev Env - macOS Version
|
||||
|
||||
- name: devel - Fonts
|
||||
homebrew_cask:
|
||||
ansible.builtin.homebrew_cask:
|
||||
name: homebrew/cask-fonts/font-hack
|
||||
state: present
|
||||
|
||||
|
@ -10,32 +10,32 @@
|
|||
- name: vscode - Basics
|
||||
block:
|
||||
- name: vscode - Basics - Install
|
||||
homebrew_cask:
|
||||
ansible.builtin.homebrew_cask:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
- visual-studio-code
|
||||
# - name: vscode - Basics - Additional dependencies (1)
|
||||
# homebrew_cask:
|
||||
# ansible.builtin.homebrew_cask:
|
||||
# name: "{{ packages }}"
|
||||
# state: present
|
||||
# vars:
|
||||
# packages:
|
||||
# - java # TODO: needs user password!
|
||||
# - name: vscode - Basics - Additional dependencies (2)
|
||||
# homebrew:
|
||||
# ansible.builtin.homebrew:
|
||||
# name: "{{ packages }}"
|
||||
# state: present
|
||||
# vars:
|
||||
# packages:
|
||||
# - graphviz
|
||||
- name: vscode - Basics - Create settings directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_user_dir }}/Library/Application Support/Code/User"
|
||||
state: directory
|
||||
- name: vscode - Basics - Copy global settings
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ role_path }}/files/vscode-settings.json"
|
||||
dest: "{{ ansible_user_dir }}/Library/Application Support/Code/User/settings.json"
|
||||
when: user_vscode == true
|
||||
|
@ -44,7 +44,7 @@
|
|||
- name: devel - C/C++
|
||||
block:
|
||||
- name: devel - C/C++ - Install developer tools
|
||||
homebrew:
|
||||
ansible.builtin.homebrew:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -59,7 +59,7 @@
|
|||
- name: devel - Golang
|
||||
block:
|
||||
- name: devel - Golang - Install developer tools
|
||||
homebrew:
|
||||
ansible.builtin.homebrew:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -71,7 +71,7 @@
|
|||
- name: devel - LaTeX
|
||||
block:
|
||||
- name: devel - LaTeX - Install basic TeX distribution
|
||||
homebrew_cask:
|
||||
ansible.builtin.homebrew_cask:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: devel - Fonts
|
||||
become: yes
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: fonts-hack-ttf
|
||||
state: present
|
||||
|
||||
|
@ -12,18 +12,18 @@
|
|||
block:
|
||||
- name: vscode - Basics - Add Repo Key
|
||||
become: yes
|
||||
apt_key:
|
||||
ansible.builtin.apt_key:
|
||||
url: "https://packages.microsoft.com/keys/microsoft.asc"
|
||||
state: present
|
||||
- name: vscode - Basics - Add Repo
|
||||
become: yes
|
||||
apt_repository:
|
||||
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
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -31,7 +31,7 @@
|
|||
- code
|
||||
- name: vscode - Basics - Additional dependencies
|
||||
become: yes
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -39,11 +39,11 @@
|
|||
- plantuml
|
||||
- graphviz
|
||||
- name: vscode - Basics - Create settings directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_user_dir }}/.config/Code/User"
|
||||
state: directory
|
||||
- name: vscode - Basics - Copy global settings
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ role_path }}/files/vscode-settings.json"
|
||||
dest: "{{ ansible_user_dir }}/.config/Code/User/settings.json"
|
||||
when: user_vscode == true
|
||||
|
@ -53,7 +53,7 @@
|
|||
block:
|
||||
- name: devel - C/C++ - Install developer tools
|
||||
become: yes
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -69,7 +69,7 @@
|
|||
block:
|
||||
- name: devel - Golang - Install developer tools
|
||||
become: yes
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -81,7 +81,7 @@
|
|||
- name: devel - LaTeX
|
||||
block:
|
||||
- name: devel - LaTeX - Install basic TeX distribution
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# - user_lang_latex: Boolean for LaTeX
|
||||
|
||||
- name: vscode - Install and configure VS Code
|
||||
include_tasks: "{{ item }}"
|
||||
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"
|
||||
|
@ -23,7 +23,7 @@
|
|||
- name: vscode - Basics
|
||||
block:
|
||||
- name: vscode - Basics - Configure
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
PATH=/usr/local/bin:$PATH
|
||||
code --install-extension chiehyu.vscode-astyle
|
||||
code --install-extension editorconfig
|
||||
|
@ -39,7 +39,7 @@
|
|||
- name: vscode - C/C++
|
||||
block:
|
||||
- name: vscode - C/C++ - Configure VS Code
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
PATH=/usr/local/bin:$PATH
|
||||
code --install-extension ms-vscode.cpptools
|
||||
code --install-extension ms-vscode.cmake-tools
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
# VS Code - Python Development Tools
|
||||
- name: devel - Python - Install python dev packages
|
||||
pip:
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- autopep8
|
||||
# - pylint # must be installed in each venv individually!
|
||||
|
@ -57,7 +57,7 @@
|
|||
- name: vscode - Python
|
||||
block:
|
||||
- name: vscode - Python - Configure VS Code
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
PATH=/usr/local/bin:$PATH
|
||||
code --install-extension ms-python.python
|
||||
when: user_vscode == true and user_lang_python == true
|
||||
|
@ -67,21 +67,21 @@
|
|||
- name: devel - Golang - Setup Environment
|
||||
block:
|
||||
- name: devel - Golang - Create workspace directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ user_lang_golang_gopath }}"
|
||||
state: directory
|
||||
- name: devel - Golang - Create zshrc-host
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_user_dir}}/.zshrc-host"
|
||||
state: touch
|
||||
- name: devel - Golang - Add GOPATH
|
||||
lineinfile:
|
||||
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
|
||||
lineinfile:
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ ansible_user_dir}}/.zshrc-host"
|
||||
line: "export PATH=$PATH:{{ user_lang_golang_gopath }}/bin"
|
||||
state: present
|
||||
|
@ -93,7 +93,7 @@
|
|||
- name: vscode - Golang
|
||||
block:
|
||||
- name: vscode - Golang - Configure VS Code
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
PATH=/usr/local/bin:$PATH
|
||||
code --install-extension golang.go
|
||||
when: user_vscode == true and user_lang_golang == true
|
||||
|
@ -101,7 +101,7 @@
|
|||
# VS Code - LaTeX Distribution
|
||||
- name: devel - LaTeX - Install TeX packages
|
||||
become: yes
|
||||
shell: |
|
||||
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
|
||||
|
@ -110,7 +110,7 @@
|
|||
- name: vscode - LaTeX
|
||||
block:
|
||||
- name: vscode - Basics - Configure
|
||||
shell: |
|
||||
ansible.builtin.shell: |
|
||||
PATH=/usr/local/bin:$PATH
|
||||
code --install-extension james-yu.latex-workshop
|
||||
code --install-extension ban.spellright
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: essentials - Install essential utilities
|
||||
become: yes
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: essentials - Install essential utilities
|
||||
become: yes
|
||||
yum:
|
||||
ansible.builtin.yum:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
@ -16,11 +16,11 @@
|
|||
|
||||
- name: essentials - Install pip - Activate EPEL
|
||||
become: yes
|
||||
yum:
|
||||
ansible.builtin.yum:
|
||||
name: epel-release
|
||||
state: present
|
||||
- name: essentials - Install pip - Install
|
||||
become: yes
|
||||
yum:
|
||||
ansible.builtin.yum:
|
||||
name: python-pip
|
||||
state: present
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip) - macOS Version
|
||||
|
||||
- name: essentials - Install essential utilities
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: essentials - Install essential utilities
|
||||
become: yes
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Essentials: Essential Utilities (git, curl; vim, tmux, zsh, pip)
|
||||
|
||||
- name: essentials - Install essential utilities
|
||||
include_tasks: "{{ item }}"
|
||||
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"
|
||||
|
|
|
@ -8,22 +8,21 @@
|
|||
# - Some can be run periodically
|
||||
# - Some must run periodically
|
||||
|
||||
|
||||
# if role has not changed, this will not be needed when just installing updates
|
||||
- name: Install essential tools
|
||||
include_tasks: essentials.yml
|
||||
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
|
||||
include_tasks: tools.yml
|
||||
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
|
||||
include_tasks: usersetup.yml
|
||||
ansible.builtin.include_tasks: usersetup.yml
|
||||
when: common_settingsonly | default(false) == false
|
||||
|
||||
# run this for every maintenance/ update cycle
|
||||
- name: Apply user settings
|
||||
import_tasks: usersettings.yml
|
||||
ansible.builtin.import_tasks: usersettings.yml
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- name: tools - Install basic utilities
|
||||
become: yes
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- name: tools - Install basic utilities
|
||||
become: yes
|
||||
yum:
|
||||
ansible.builtin.yum:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Tools: Additional Tools (depending on OS) - macOS Version
|
||||
|
||||
- name: tools - Install basic utilities
|
||||
homebrew:
|
||||
ansible.builtin.homebrew:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
update_homebrew: yes
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- name: tools - Install basic utilities
|
||||
become: yes
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Tools: Additional Tools (depending on OS) (rsync; dnsutils, htop, unzip)
|
||||
|
||||
- name: tools - Install basic utilities
|
||||
include_tasks: "{{ item }}"
|
||||
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"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: update - Update and upgrade all packages
|
||||
become: yes
|
||||
yum:
|
||||
ansible.builtin.yum:
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# Common/Update: Install All Updates - macOS Version
|
||||
|
||||
- name: update - Update and upgrade all packages
|
||||
homebrew:
|
||||
ansible.builtin.homebrew:
|
||||
update_homebrew: yes
|
||||
upgrade_all: yes
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: update - Update and upgrade all packages
|
||||
become: yes
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
force_apt_get: true
|
||||
name: "*"
|
||||
state: latest
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Update: Install All Updates
|
||||
|
||||
- name: update - Update and upgrade all packages
|
||||
include_tasks: "{{ item }}"
|
||||
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"
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
# Common/Usersettings: Universial Dotfiles. Update regularly.
|
||||
|
||||
- name: usersettings - Install/ Update oh-my-zsh for current user
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/robbyrussell/oh-my-zsh.git
|
||||
dest: .oh-my-zsh
|
||||
|
||||
- name: usersettings - Install/ Update fzf sources
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/junegunn/fzf.git
|
||||
dest: .fzf
|
||||
register: fzf_git
|
||||
- name: (Re-)Install fzf
|
||||
shell: ".fzf/install --key-bindings --no-completion --no-update-rc"
|
||||
ansible.builtin.shell: ".fzf/install --key-bindings --no-completion --no-update-rc"
|
||||
when:
|
||||
- fzf_git.after != fzf_git.before
|
||||
|
||||
|
@ -20,62 +20,81 @@
|
|||
block:
|
||||
- name: usersettings - Install pip virtualenvwrapper (Debian)
|
||||
become: yes
|
||||
pip:
|
||||
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)
|
||||
environment:
|
||||
PATH: "/usr/local/bin:{{ ansible_env.PATH }}"
|
||||
pip:
|
||||
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)
|
||||
become: yes
|
||||
pip:
|
||||
ansible.builtin.pip:
|
||||
name: virtualenvwrapper
|
||||
when: (override_os_family is defined) | ternary(override_os_family,ansible_os_family) == "Centos" or
|
||||
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
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- { src: "{{ role_path }}/files/_gitignore_global", dest: ".gitignore_global" }
|
||||
- {
|
||||
src: "{{ role_path }}/files/_gitignore_global",
|
||||
dest: ".gitignore_global",
|
||||
}
|
||||
- { src: "{{ role_path }}/files/_vimrc", dest: ".vimrc" }
|
||||
- { src: "{{ role_path }}/files/_oh-my-zsh/jtbx.zsh-theme", dest: ".oh-my-zsh/custom/themes/jtbx.zsh-theme" }
|
||||
- {
|
||||
src: "{{ role_path }}/files/_oh-my-zsh/jtbx.zsh-theme",
|
||||
dest: ".oh-my-zsh/custom/themes/jtbx.zsh-theme",
|
||||
}
|
||||
- name: usersettings - Set zshrc
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/_zshrc.j2"
|
||||
dest: "{{ ansible_user_dir }}/.zshrc"
|
||||
- name: usersettings - Set global gitconfig
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/_gitconfig.j2"
|
||||
dest: "{{ ansible_user_dir }}/.gitconfig"
|
||||
when: usersetup_gitconfig == true
|
||||
- name: usersettings - Set tmux.conf
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/_tmux.conf.j2"
|
||||
dest: "{{ ansible_user_dir }}/.tmux.conf"
|
||||
|
||||
- name: usersettings - Create .vim directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: .vim/autoload
|
||||
state: directory
|
||||
|
||||
- name: usersettings - Install vim plugin manager
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: https://tpo.pe/pathogen.vim
|
||||
dest: .vim/autoload/pathogen.vim
|
||||
|
||||
- name: usersettings - Install vim plugins
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: "{{ item.repo }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- { repo: "https://github.com/itchyny/lightline.vim", dest: ".vim/bundle/lightline" }
|
||||
- {
|
||||
repo: "https://github.com/itchyny/lightline.vim",
|
||||
dest: ".vim/bundle/lightline",
|
||||
}
|
||||
- { repo: "https://github.com/w0rp/ale", dest: ".vim/bundle/ale" }
|
||||
- { repo: "https://github.com/airblade/vim-gitgutter", dest: ".vim/bundle/vim-gitgutter" }
|
||||
- { repo: "https://github.com/sheerun/vim-polyglot", dest: ".vim/bundle/vim-polyglot" }
|
||||
- { repo: "https://github.com/tpope/vim-commentary", dest: ".vim/bundle/vim-commentary" }
|
||||
- {
|
||||
repo: "https://github.com/airblade/vim-gitgutter",
|
||||
dest: ".vim/bundle/vim-gitgutter",
|
||||
}
|
||||
- {
|
||||
repo: "https://github.com/sheerun/vim-polyglot",
|
||||
dest: ".vim/bundle/vim-polyglot",
|
||||
}
|
||||
- {
|
||||
repo: "https://github.com/tpope/vim-commentary",
|
||||
dest: ".vim/bundle/vim-commentary",
|
||||
}
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
|
||||
|
||||
- name: usersetup - Check, if usersetup already ran
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: .ansbl-common-usersetup
|
||||
register: common_usersetup
|
||||
|
||||
- name: usersetup - Change login shell to zsh for current user
|
||||
become: yes
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
shell: /bin/zsh
|
||||
when:
|
||||
|
@ -18,27 +18,27 @@
|
|||
# TODO: adapt to ArchLinux systems, if needed
|
||||
# - name: usersetup - Install locales package
|
||||
# become: yes
|
||||
# apt:
|
||||
# ansible.builtin.apt:
|
||||
# name: locales
|
||||
# state: present
|
||||
|
||||
# - name: usersetup - Setup locale en_US
|
||||
# become: yes
|
||||
# locale_gen:
|
||||
# ansible.builtin.locale_gen:
|
||||
# name: en_US.UTF-8
|
||||
# state: present
|
||||
# when:
|
||||
# - common_usersetup.stat.exists == false
|
||||
# - name: usersetup - Setup locale de_DE
|
||||
# become: yes
|
||||
# locale_gen:
|
||||
# ansible.builtin.locale_gen:
|
||||
# name: de_DE.UTF-8
|
||||
# state: present
|
||||
# when:
|
||||
# - common_usersetup.stat.exists == false
|
||||
|
||||
- name: usersetup - Create lockfile
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: .ansbl-common-usersetup
|
||||
state: touch
|
||||
when:
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
|
||||
|
||||
- name: usersetup - Check, if usersetup already ran
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: .ansbl-common-usersetup
|
||||
register: common_usersetup
|
||||
|
||||
- name: usersetup - Change login shell to zsh for current user
|
||||
become: yes
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
shell: /bin/zsh
|
||||
when:
|
||||
|
@ -18,27 +18,27 @@
|
|||
# TODO: adapt to CentOS/ RHEL systems, if needed
|
||||
# - name: usersetup - Install locales package
|
||||
# become: yes
|
||||
# apt:
|
||||
# ansible.builtin.apt:
|
||||
# name: locales
|
||||
# state: present
|
||||
|
||||
# - name: usersetup - Setup locale en_US
|
||||
# become: yes
|
||||
# locale_gen:
|
||||
# ansible.builtin.locale_gen:
|
||||
# name: en_US.UTF-8
|
||||
# state: present
|
||||
# when:
|
||||
# - common_usersetup.stat.exists == false
|
||||
# - name: usersetup - Setup locale de_DE
|
||||
# become: yes
|
||||
# locale_gen:
|
||||
# ansible.builtin.locale_gen:
|
||||
# name: de_DE.UTF-8
|
||||
# state: present
|
||||
# when:
|
||||
# - common_usersetup.stat.exists == false
|
||||
|
||||
- name: usersetup - Create lockfile
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: .ansbl-common-usersetup
|
||||
state: touch
|
||||
when:
|
||||
|
|
|
@ -3,20 +3,20 @@
|
|||
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
|
||||
|
||||
- name: usersetup - Check, if usersetup already ran
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: .ansbl-common-usersetup
|
||||
register: common_usersetup
|
||||
|
||||
- name: usersetup - Change login shell to zsh for current user
|
||||
become: yes
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
shell: /bin/zsh
|
||||
when:
|
||||
- common_usersetup.stat.exists == false and usersetup_chsh == true
|
||||
|
||||
- name: usersetup - Create lockfile
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: .ansbl-common-usersetup
|
||||
state: touch
|
||||
when:
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
|
||||
|
||||
- name: usersetup - Check, if usersetup already ran
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: .ansbl-common-usersetup
|
||||
register: common_usersetup
|
||||
|
||||
- name: usersetup - Change login shell to zsh for current user
|
||||
become: yes
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
shell: /bin/zsh
|
||||
when:
|
||||
|
@ -17,27 +17,27 @@
|
|||
|
||||
- name: usersetup - Install locales package
|
||||
become: yes
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: locales
|
||||
state: present
|
||||
|
||||
- name: usersetup - Setup locale en_US
|
||||
become: yes
|
||||
locale_gen:
|
||||
ansible.builtin.locale_gen:
|
||||
name: en_US.UTF-8
|
||||
state: present
|
||||
when:
|
||||
- common_usersetup.stat.exists == false
|
||||
- name: usersetup - Setup locale de_DE
|
||||
become: yes
|
||||
locale_gen:
|
||||
ansible.builtin.locale_gen:
|
||||
name: de_DE.UTF-8
|
||||
state: present
|
||||
when:
|
||||
- common_usersetup.stat.exists == false
|
||||
|
||||
- name: usersetup - Create lockfile
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: .ansbl-common-usersetup
|
||||
state: touch
|
||||
when:
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
|
||||
|
||||
- name: usersetup - Check, if usersetup already ran
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: .ansbl-common-usersetup
|
||||
register: common_usersetup
|
||||
|
||||
- name: usersetup - Change login shell to zsh for current user
|
||||
become: yes
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
shell: /usr/local/bin/zsh
|
||||
when:
|
||||
|
@ -17,27 +17,27 @@
|
|||
|
||||
# - name: usersetup - Install locales package
|
||||
# become: yes
|
||||
# apt:
|
||||
# ansible.builtin.apt:
|
||||
# name: locales
|
||||
# state: present
|
||||
|
||||
# - name: usersetup - Setup locale en_US
|
||||
# become: yes
|
||||
# locale_gen:
|
||||
# ansible.builtin.locale_gen:
|
||||
# name: en_US.UTF-8
|
||||
# state: present
|
||||
# when:
|
||||
# - common_usersetup.stat.exists == false
|
||||
# - name: usersetup - Setup locale de_DE
|
||||
# become: yes
|
||||
# locale_gen:
|
||||
# ansible.builtin.locale_gen:
|
||||
# name: de_DE.UTF-8
|
||||
# state: present
|
||||
# when:
|
||||
# - common_usersetup.stat.exists == false
|
||||
|
||||
- name: usersetup - Create lockfile
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: .ansbl-common-usersetup
|
||||
state: touch
|
||||
when:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
|
||||
|
||||
- name: usersetup - Run setup tasks
|
||||
include_tasks: "{{ item }}"
|
||||
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"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: usertools - Install user's working utilities
|
||||
become: yes
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: usertools - Install user's working utilities
|
||||
become: yes
|
||||
yum:
|
||||
ansible.builtin.yum:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Usertools: User's Main Machine/ Developer Tools - macOS Version
|
||||
|
||||
- name: usertools - Install user's working utilities
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
- name: usertools - Install user's working utilities
|
||||
become: yes
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: "{{ packages }}"
|
||||
state: present
|
||||
vars:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Common/Usertools: User's Main Machine/ Developer Tools (nmap, rsync, icdiff, iftop, ansible)
|
||||
|
||||
- name: usertools - Install user's working utilities
|
||||
include_tasks: "{{ item }}"
|
||||
ansible.builtin.include_tasks: "{{ item }}"
|
||||
with_first_found:
|
||||
- "usertools-{{ ansible_distribution }}.yml"
|
||||
- "usertools-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml"
|
||||
|
|
Loading…
Reference in a new issue