-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.yml
executable file
·58 lines (50 loc) · 1.37 KB
/
local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
- name: DotFiles
hosts: localhost
connection: local
pre_tasks:
- name: Detect WSL
ansible.builtin.import_tasks: pre_tasks/detect_wsl.yml
tags:
- always
- name: Detect wsl
ansible.builtin.debug:
var: ansible_host_environment_is_wsl
tags:
- always
- name: Confirm Windows PowerShell Execution Policy
ansible.builtin.import_tasks: pre_tasks/powershell_executionpolicy.yml
when: ansible_host_environment_is_wsl
tags:
- always
- name: Detect Host User
ansible.builtin.import_tasks: pre_tasks/whoami_wsl.yml
when: ansible_host_environment_is_wsl
tags:
- always
- name: Detect Host User
ansible.builtin.import_tasks: pre_tasks/whoami.yml
tags:
- always
tasks:
- name: Set roles
ansible.builtin.set_fact:
run_roles: "{{ ansible_run_tags != ['all'] and ansible_run_tags or default_roles | difference(exclude_roles | default([])) }}"
tags:
- always
- name: Display roles
ansible.builtin.debug:
var: run_roles
tags:
- always
- name: Run roles
ansible.builtin.include_role:
apply:
tags:
- "{{ roles_item }}"
name: "{{ roles_item }}"
loop_control:
loop_var: roles_item
with_items: "{{ run_roles }}"
tags:
- always