-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
105 lines (92 loc) · 2.2 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
- hosts: localhost
connection: local
vars:
keyd_vars:
PREFIX: "{{ ansible_user_dir }}/.local"
CONFIG_DIR: "{{ ansible_user_dir }}/.config/keyd"
pre_tasks:
- name: Detect Host User
ansible.builtin.import_tasks: pre_tasks/whoami.yml
tags:
- always
- name: Install yay
ansible.builtin.import_tasks: pre_tasks/yay.yml
tags:
- always
- name: Install flatpak
ansible.builtin.include_role:
apply:
tags:
- always
name: flatpak
tags:
- always
- name: Include main playbook configuration.
ansible.builtin.include_vars: "{{ item }}"
with_fileglob:
- "{{ playbook_dir }}/config.yml"
no_log: true
tags:
- always
- name: Include secrets
ansible.builtin.include_vars: "{{ item }}"
with_fileglob:
- "{{ playbook_dir }}/secrets.yml"
no_log: true
tags:
- always
#create cutom directories
- name: Run dirs role
ansible.builtin.include_role:
apply:
tags:
- always
name: dirs
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: Display roles
ansible.builtin.debug:
var: run_roles
tags:
- always
- name: Run system role
ansible.builtin.include_role:
apply:
tags:
- always
name: system
tags:
- always
- name: Run zsh role
ansible.builtin.include_role:
apply:
tags:
- always
name: zsh
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
- name: "Running Stow"
include_role:
apply:
tags:
- always
name: stow
tags:
- always