Default tasks: Don't install updates by default

This commit is contained in:
Jannik Beyerstedt 2021-08-25 15:31:46 +02:00
parent a5c6f22c21
commit a384c4385a
2 changed files with 14 additions and 20 deletions

View file

@ -56,6 +56,15 @@ Example Playbook
You can simply run the whole role: You can simply run the whole role:
```yml ```yml
- name: Basic User Shell Setup
hosts: all
tasks:
- import_role:
name: common
```
Or call the different tasks individually:
```yml
- name: Basic User Shell Setup - name: Basic User Shell Setup
hosts: all hosts: all
tasks: tasks:
@ -64,17 +73,18 @@ You can simply run the whole 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
- name: Basics - Install essential tools - name: Basics - Install essential tools
include_role: include_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 more tools - name: Basics - Install basic tools
include_role: include_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: include_role:
name: common name: common
@ -85,30 +95,17 @@ You can simply run the whole role:
name: common name: common
tasks_from: usersettings tasks_from: usersettings
# Additional Tasks for Specific Host Types (not included in the role's main.yml) ## Additionall tasks for a work station machine
# more tools for your main machine
- name: Basics - Install user's working utilities - name: Basics - Install user's working utilities
import_role: import_role:
name: common name: common
tasks_from: usertools tasks_from: usertools
# install programming languages and optionally VS Code
- name: Basics - Install and configure development env (and VS Code) - name: Basics - Install and configure development env (and VS Code)
import_role: import_role:
name: common name: common
tasks_from: devel tasks_from: devel
``` ```
Or call the different tasks individually:
```yml
- name: Basic User Shell Setup
hosts: all
tasks:
- import_role:
name: common
```
License License
------- -------

View file

@ -2,15 +2,12 @@
# Common setup tasks for all nodes (universial) # Common setup tasks for all nodes (universial)
# Usage: # Usage:
# - Run this whole role for setup # - Run this whole role for setup
# - You will do nothing wrong, if all steps are executed during periodocal maintenance # - You will do nothing wrong, if all steps are executed during periodical maintenance
# - Maintenance can be faster, if some steps are left out: # - Maintenance can be faster, if some steps are left out:
# - Some tasks are only needed for setup # - Some tasks are only needed for setup
# - Some can be run periodically # - Some can be run periodically
# - Some must run periodically # - Some must run periodically
- name: Install updates
include_tasks: update.yml
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 essential tools - name: Install essential tools