-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathansiblue.yaml
66 lines (60 loc) · 1.87 KB
/
ansiblue.yaml
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
- hosts: localhost
connection: local
vars:
project: ansiblue
ansible_remote_tmp: /tmp
ansiblue_dir: "{{ playbook_dir }}"
config:
flatpak: "{{ lookup('template', 'configs/flatpak.yaml') | from_yaml }}"
toolbox: "{{ lookup('template', 'configs/toolbox.yaml') | from_yaml }}"
host: "{{ lookup('template', 'configs/host.yaml') | from_yaml }}"
tasks:
- name: Ensure directory {{ lookup('env','HOME') }}/.local/bin exists
ansible.builtin.file:
path: "{{ lookup('env','HOME') }}/.local/bin"
state: directory
mode: '0755'
tags: [always]
- name: Add flatpak remotes
community.general.flatpak_remote:
name: "{{ item.name }}"
state: "{{ item.state }}"
method: "{{ item.method }}"
flatpakrepo_url: "{{ item.flatpakrepo_url }}"
loop: "{{ config.flatpak.remotes }}"
tags: [flatpak]
- name: Setup flatpaks
include_tasks: playbooks/setup/setup_flatpak.yaml
tags: [always]
args:
apply:
tags: [flatpak]
loop: "{{ config.flatpak.flatpaks }}"
loop_control:
loop_var: flatpak
label: "{{ flatpak.name }}"
- name: Create and configure toolbox
include_tasks: playbooks/setup/setup_toolbox.yaml
tags: [always]
args:
apply:
tags: [toolbox, "{{ toolbox.name }}"]
loop: "{{ config.toolbox }}"
loop_control:
loop_var: toolbox
label: "{{ toolbox.name }}"
- name: Configure host
include_tasks: playbooks/setup/setup_host.yaml
tags: [always]
args:
apply:
tags: [host]
loop: "{{ config.host }}"
loop_control:
loop_var: host
label: "{{ host.name }}"
handlers:
- name: grub2-mkconfig
ansible.builtin.command:
cmd: grub2-mkconfig -o /etc/grub2-efi.cfg
become: yes