-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathasmodeo.yaml
78 lines (70 loc) · 2.16 KB
/
asmodeo.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
67
68
69
70
71
72
73
74
75
76
77
78
- hosts: localhost
connection: local
vars:
project: ansmodeo
ansible_remote_tmp: /tmp
asmodeo_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: Check sudo password first
ansible.builtin.command:
cmd: echo "sudo password correct"
become: yes
changed_when: false
tags: [always]
- 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:{{ 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: update ca trust
ansible.builtin.command:
cmd: /bin/update-ca-trust
become: yes
# - name: grub2-mkconfig
# ansible.builtin.command:
# cmd: grub2-mkconfig -o /etc/grub2-efi.cfg
# become: yes