-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.yml
108 lines (87 loc) · 2.52 KB
/
site.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
106
107
108
---
- name: Configure laptop
hosts:
- all
vars:
vagrant_version: 2.2.14
pre_tasks:
- name: Load OS variables
include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "{{ansible_distribution|lower}}.yml"
- "{{ansible_os_family|lower}}.yml"
- default.yaml
paths:
- 'vars'
tags: [always]
- name: Update apt cache if needed
apt:
cache_valid_time: 3600
become: yes
when: ansible_os_family|lower == 'debian'
tags: [always]
- name: Install pre-requisite packages
package:
name:
- git
become: true
tags: [always]
roles:
- edgester.flatpak
- role: crivetimihai.bootstrap
become: yes
- role: geerlingguy.dotfiles
tags: [dotfiles]
- role: skype
when: ansible_os_family|lower == 'debian'
become: yes
- role: signal-desktop
become: yes
when: ansible_os_family|lower == 'debian'
- role: elreydetoda.virtualization.kvm
when: ansible_os_family|lower == 'debian'
- role: elreydetoda.virtualization.vagrant
when: ansible_os_family|lower == 'debian'
- role: vagrant_libvirt
when: ansible_os_family|lower == 'debian'
tasks:
- name: Add obs studio PPA and key
apt_repository:
repo: ppa:obsproject/obs-studio
become: yes
when: ansible_os_family|lower == 'debian'
- name: Check if powertools is enabled
ansible.builtin.shell: "dnf repolist | grep -qs powertools"
changed_when: false
failed_when: false
when: ansible_os_family|lower == 'redhat'
register: dnf_powertools
- name: Enable powertools repo on Red Hat family
ansible.builtin.command: "dnf config-manager --set-enabled powertools"
become: yes
when:
- ansible_os_family|lower == 'redhat'
- dnf_powertools.rc != 0
- name: Install OS packages
package:
name: "{{ package_list }}"
state: present
become: yes
- name: Run dotfiles pre-flight script
command: ~/dotfiles/pre-flight
register: dotfiles_preflight
tags: [dotfiles]
- name: ~/dotfiles/pre-flight output
debug:
var: dotfiles_preflight.stdout_lines
tags: [dotfiles]
- name: Run dotfiles run script
command: ~/dotfiles/run
register: dotfiles_run
tags: [dotfiles]
- name: ~/dotfiles/run output
debug:
var: dotfiles_run.stdout_lines
tags: [dotfiles]