[FIX] add common_settingsonly flag to role as well

This commit is contained in:
Jannik Beyerstedt 2019-10-31 18:29:35 +01:00
parent cb3f6cdf7a
commit c37ae1742c
4 changed files with 24 additions and 10 deletions

View File

@ -30,6 +30,8 @@ For a GUI/ Desktop machine, you can enable to install and configure VS Code:
The `user_lang_*` switches will also install the language only, if `user_vscode` is set to false.
To install just the dotfiles, set `common_settingsonly` to true.
Dependencies
------------
@ -50,31 +52,37 @@ You can simply run the whole role:
import_role:
name: common
tasks_from: update
when: common_settingsonly | default(false) == false
- name: Basics - Install essential tools
import_role:
name: common
tasks_from: essentials
when: common_settingsonly | default(false) == false
- name: Basics - Install more tools
import_role:
name: common
tasks_from: tools
when: common_settingsonly | default(false) == false
- name: Basics - Setup user shell
import_role:
name: common
tasks_from: usersetup
when: common_settingsonly | default(false) == false
- name: Basics - Install dotfiles
import_role:
name: common
tasks_from: usersettings
# just for you main machine (not included in the role's main.yml)
# Additional Tasks for Specific Host Types (not included in the role's main.yml)
# more tools for your main machine
- name: Basics - Install user's working utilities
import_role:
name: common
tasks_from: usertools
# (not included in the role's main.yml)
# install programming languages and optionally VS Code
- name: Basics - Install and configure VS Code
import_role:
name: common
@ -87,9 +95,8 @@ Or call the different tasks individually:
hosts: all
strategy: free
tasks:
- name: Basics - Update first
roles:
- common
- import_role:
name: common
```

View File

@ -1,6 +1,9 @@
---
# defaults file for common
# just copy dotfiles (for foreign hosts like webhosting)
common_settingsonly: false
# change login shell
usersetup_chsh: true

@ -1 +1 @@
Subproject commit e70885ae15e32de67ca259e304516237663a5e92
Subproject commit 93673888bb177052a8b7f993c05e4c29d3b86c7a

View File

@ -9,21 +9,25 @@
# - Some must run periodically
- name: Install updates
import_tasks: update.yml
include_tasks: update.yml
when: common_settingsonly == false
# if role has not changed, this will not be needed when just installing updates
- name: Install essential tools
import_tasks: essentials.yml
include_tasks: essentials.yml
when: common_settingsonly == false
# if role has not changed, this will not be needed when just installing updates
- name: Install more tools
import_tasks: tools.yml
include_tasks: tools.yml
when: common_settingsonly == false
# this will just run once, because of a lock-file
- name: Basics - Setup user shell
import_tasks: usersetup.yml
include_tasks: usersetup.yml
when: common_settingsonly == false
# run this for every maintenance/ update cycle
- name: Apply user settings