-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.yml
59 lines (59 loc) · 1.68 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
59
---
- hosts: localhost
vars:
sshkey: ".ssh/ansible_ed25519"
pre_tasks:
- name: pre-run | Create temporary file
ansible.builtin.tempfile:
state: file
suffix: temp
register: tempfile_ssh
changed_when: false
tags:
- never
- install
- dotfiles
- name: pre-run | Temporarily install SSH key to tmp directory
ansible.builtin.copy:
src: "{{ sshkey }}"
dest: "{{ tempfile_ssh.path }}"
mode: "0600"
changed_when: false
tags:
- never
- install
- dotfiles
tasks:
- name: init | Load tasks
tags:
- never
block:
- name: core | Load
ansible.builtin.import_tasks: tasks/core.yml
- name: zsh | Load
ansible.builtin.import_tasks: tasks/zsh.yml
- name: dotfiles | Load
ansible.builtin.import_tasks: tasks/dotfiles.yml
- name: tools | Load
ansible.builtin.import_tasks: tasks/tools.yml
- name: wayland | Load
ansible.builtin.import_tasks: tasks/wayland.yml
- name: theme | Load
ansible.builtin.import_tasks: tasks/theme.yml
- name: media | Load
ansible.builtin.import_tasks: tasks/media.yml
rescue:
- name: error | Print when errors
ansible.builtin.debug:
msg: Encountered an error!
changed_when: false
tags: always
always:
- name: cleanup | Remove all temporary files
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_fileglob:
- "/tmp/ansible.*temp"
changed_when: false
tags: always