summaryrefslogtreecommitdiff
path: root/roles/gonic/tasks/main.yml
blob: 10832c0ac3171e528b75816eacb645580aa78d5c (plain)
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
- name: Install gonic
  community.general.apk:
    name: gonic

- name: Create music folder
  ansible.builtin.file:
    path: /media/seagate/music
    state: directory

- name: Create podcasts folder
  ansible.builtin.file:
    path: /media/seagate/podcasts
    state: directory

- name: Create playlists folder
  ansible.builtin.file:
    path: /media/seagate/playlists
    state: directory

- name: Create cache folder
  ansible.builtin.file:
    path: /var/gonic/cache
    state: directory

- name: Symlink music folder to /srv
  ansible.builtin.file:
    src: /media/seagate/music
    dest: /srv/music
    state: link

- name: Symlink podcasts folder to /srv
  ansible.builtin.file:
    src: /media/seagate/podcasts
    dest: /srv/podcasts
    state: link

- name: Symlink playlists folder to /srv
  ansible.builtin.file:
    src: /media/seagate/playlists
    dest: /srv/playlists
    state: link

- name: Add gonic service
  ansible.builtin.template:
    src: openrc/gonic
    dest: /etc/init.d/gonic
    mode: "755"

- name: Enable and restart gonic service
  ansible.builtin.service:
    name: gonic
    enabled: true
    state: restarted