ansible-role-common/README.md

100 lines
2.5 KiB
Markdown
Raw Normal View History

Common
=========
Common user settings and tools used by Jannik Beyerstedt.
This role is compatible with Debian based systems and macOS.
Requirements
------------
none
Role Variables
--------------
This role uses the apt package manager on Debian based hosts.
But for some operating systems the `ansible_os_family` variable is not set to "Debian" by the fact gathering even if it is Debian based (like Mendel GNU/Linux on the Google Coral Dev Board).
- `override_os_family`: Set to "Debian" in the host inventory, if `ansible_os_family` is not set correctly
The User Setup will change the user shell and global gitconfig. This can be disabled:
- `usersetup_chsh`: Boolean to disable changing the user shell to zsh
- `usersetup_gitconfig`: Boolean to disable overriding the global gitconfig
For a GUI/ Desktop machine, you can enable to install and configure VS Code:
- `user_vscode`: Boolean to install and set the basic configuration of VS Code
- `user_lang_cpp`: Boolean to install C/C++ dev tools and configure VS Code
- `user_lang_python`: Boolean to install Python dev tools and configure VS Code
2019-10-17 08:25:49 +00:00
- `user_lang_golang`: Boolean to install Golang dev tools and configure VS Code
2019-10-20 20:41:00 +00:00
The `user_lang_*` switches will also install the language only, if `user_vscode` is set to false.
Dependencies
------------
none
Example Playbook
----------------
You can simply run the whole role:
```yml
- name: Basic User Shell Setup
hosts: all
strategy: free
tasks:
- name: Basics - Update first
import_role:
name: common
tasks_from: update
- name: Basics - Install essential tools
import_role:
name: common
tasks_from: essentials
- name: Basics - Install more tools
import_role:
name: common
tasks_from: tools
- name: Basics - Setup user shell
import_role:
name: common
tasks_from: usersetup
- name: Basics - Install dotfiles
import_role:
name: common
tasks_from: usersettings
2019-10-14 06:47:22 +00:00
# just for you main machine (not included in the role's main.yml)
- name: Basics - Install user's working utilities
2019-10-14 06:47:22 +00:00
import_role:
name: common
tasks_from: usertools
# (not included in the role's main.yml)
- name: Basics - Install and configure VS Code
import_role:
name: common
tasks_from: vscode
```
Or call the different tasks individually:
```yml
- name: Basic User Shell Setup
hosts: all
strategy: free
tasks:
- name: Basics - Update first
roles:
- common
```
License
-------
GPLv3