-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
138 lines (131 loc) · 3.27 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
- name: rpmfusion enabled (https://rpmfusion.org/Configuration)
hosts: all
become: yes
tasks:
- name: rpmfusion repo added
include_tasks: rpmfusion_tasks.yml
loop:
- free
- nonfree
- name: system initialized
hosts: all
become: yes
gather_facts: no
vars_files: [vars.yml]
tasks:
# - name: system up to date
# dnf: name=* state=latest update_cache=yes
- name: unwanted packages removed
dnf:
name: fedora-chromium-config
state: absent
- name: packages installed
dnf:
name: "{{ packages }}"
state: present
- name: rpmfusion packages installed
dnf:
name: "{{ rpmfusion_packages }}"
state: present
- name: user created
user:
name: "{{ username }}"
state: present
shell: /usr/bin/fish
generate_ssh_key: yes
groups: wheel
- name: unnecessary services disabled
service:
name: "{{ item }}"
state: stopped
enabled: no
loop:
- packagekit
- raid-check.timer
- name: tailscale configured
hosts: all
become: yes
gather_facts: no
tasks:
- name: tailscale repo added
get_url:
url: https://pkgs.tailscale.com/stable/fedora/tailscale.repo
dest: /etc/yum.repos.d/tailscale.repo
- name: tailscale installed
dnf:
name: tailscale
state: present
- name: tailscale service enabled
service:
name: tailscaled
state: started
enabled: yes
- name: NUT configured
hosts: all
become: yes
gather_facts: no
tasks:
- name: NUT config directory exists
file:
path: /etc/nut
state: directory
- name: UPS configuration placed
copy:
src: ups.conf
dest: /etc/nut/ups.conf
# - name: plex installed
# hosts: all
# become: yes
# gather_facts: no
# tasks:
# - name: plex repo added
# copy:
# dest: /etc/yum.repos.d/plex.repo
# content: |
# [Plexrepo]
# name=plexrepo
# baseurl=https://downloads.plex.tv/repo/rpm/$basearch/
# enabled=1
# gpgkey=https://downloads.plex.tv/plex-keys/PlexSign.key
# gpgcheck=1
# - name: plex package installed
# dnf:
# name: plexmediaserver
# update_cache: yes
# - name: github CLI installed
# hosts: all
# become: yes
# gather_facts: no
# tasks:
# # TODO fix once feature added for dnf module: https://github.com/ansible/ansible/issues/46963
# - name: gh repo installed
# command:
# cmd: dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
# warn: false
# args:
# creates: /etc/yum.repos.d/gh-cli.repo
# - name: gh package installed
# dnf:
# state: present
# name: gh
- name: /home initialized
hosts: all
become: yes
become_user: "{{ username }}"
gather_facts: no
vars_files: [vars.yml]
tasks:
- name: home directories exist
file:
path: /home/{{ username }}/{{ item }}
state: directory
loop: "{{ home_directories }}"
- name: dotfiles symlinked
hosts: all
become: yes
become_user: "{{ username }}"
gather_facts: no
vars_files: [vars.yml]
roles:
- geerlingguy.dotfiles