-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.yml
More file actions
49 lines (49 loc) · 1.4 KB
/
main.yml
File metadata and controls
49 lines (49 loc) · 1.4 KB
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
- 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 WSL
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: default_roles
# tags:
# - always
- name: Run roles
ansible.builtin.include_role:
name: "{{ roles_item }}"
# apply:
# tags:
# - "{{ roles_item }}"
loop: "{{ default_roles }}"
loop_control:
loop_var: roles_item
# tags:
# - always