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