configuration.yml 1.37 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
15
16
17
18
19
20
21
22
23

- 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

- 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
24
25
- name: Configuration du service HedgeDocs
  template:
nono's avatar
nono committed
26
    src: files/config.json.j2
27
    dest: /home/hedgedocs/hedgedoc/config.json
nono's avatar
nono committed
28
    owner: hedgedocs
29
    group: www-data
nono's avatar
nono committed
30
    mode: 0644
nono's avatar
nono committed
31
32

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

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

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

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

# And we're done !