-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
main.yml
57 lines (49 loc) · 1.41 KB
/
main.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
---
- name: DotFiles Config
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
- name: Detect 1Password
ansible.builtin.import_tasks: pre_tasks/detect_1password.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([])) | sort }}"
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