configuration.yml 1.41 KB
Newer Older
nono's avatar
nono committed
1
---
nono's avatar
nono committed
2
3
4

# Voir : https://github.com/hedgedoc/hedgedoc/blob/master/docs/configuration.md
# et : https://github.com/hedgedoc/hedgedoc/blob/880af8d4f80b9e1dcaa30014d4ed5c41e351b564/docs/setup/reverse-proxy.md
5
6
7
8
9
10
11
12
13
14

- name: Mise en éxécutable du script de dépendances
  ansible.builtin.file:
    path: /home/hedgedocs/hedgedoc/bin/setup
    owner: hedgedocs
    group: www-data
    mode: '0777'

- name: Configuration des dépendances
  ansible.builtin.shell: /home/hedgedocs/hedgedoc/bin/setup >> /home/hedgedocs/setup_log_hedgedocs.txt
nono's avatar
nono committed
15
  args:
nono's avatar
nono committed
16
    chdir: /home/hedgedocs/hedgedoc
17
18
19
20
21
22
23
24

- name: Mise en non-éxécutable du script de dépendances
  ansible.builtin.file:
    path: /home/hedgedocs/hedgedoc/bin/setup
    owner: hedgedocs
    group: www-data
    mode: '0644'

nono's avatar
nono committed
25
26
- name: Configuration du service HedgeDocs
  template:
nono's avatar
nono committed
27
    src: files/config.json.j2
28
    dest: /home/hedgedocs/hedgedoc/config.json
nono's avatar
nono committed
29
    owner: hedgedocs
30
    group: www-data
nono's avatar
nono committed
31
    mode: 0600
nono's avatar
nono committed
32
33

- name: Configuration du fichier SystemD
nono's avatar
nono committed
34
  template:
nono's avatar
nono committed
35
    src: files/hedgedocs.service
nono's avatar
nono committed
36
    dest: /etc/systemd/system/hedgedocs.service
nono's avatar
nono committed
37
38
    owner: root
    group: root
nono's avatar
nono committed
39
    mode: 0644
nono's avatar
nono committed
40
41
42
43
44
45
46

- name: Activation de la configuration systemd
  systemd:
    state: started
    name: hedgedocs
    enabled: yes

47
48
- name: Force systemd à relire les configs
  ansible.builtin.systemd:
nono's avatar
nono committed
49
    daemon_reload: yes
50
51

- name: Reload nginx
nono's avatar
nono committed
52
53
54
55
  systemd:
    state: reloaded
    name: nginx
    enabled: yes
56
57

# And we're done !