2020-07-15 07:27:11 +00:00
|
|
|
---
|
|
|
|
- name: Create note_kfet dir with good permissions
|
|
|
|
file:
|
|
|
|
path: /var/www/note_kfet
|
|
|
|
state: directory
|
|
|
|
owner: www-data
|
|
|
|
group: www-data
|
|
|
|
mode: u=rwx,g=rwxs,o=rx
|
|
|
|
|
|
|
|
- name: Clone Note Kfet
|
|
|
|
git:
|
|
|
|
repo: https://gitlab.crans.org/bde/nk20.git
|
|
|
|
dest: /var/www/note_kfet
|
2020-09-06 08:32:52 +00:00
|
|
|
version: "{{ note.git_branch }}"
|
2020-07-15 08:09:28 +00:00
|
|
|
force: true
|
2020-07-15 07:27:11 +00:00
|
|
|
|
2020-07-15 09:32:08 +00:00
|
|
|
- name: Use default env vars (should be updated!)
|
2020-07-25 15:36:37 +00:00
|
|
|
template:
|
2020-10-30 19:54:41 +00:00
|
|
|
src: "env.j2"
|
2020-07-25 15:36:37 +00:00
|
|
|
dest: "/var/www/note_kfet/.env"
|
|
|
|
mode: 0644
|
2020-07-26 10:05:41 +00:00
|
|
|
force: false
|
2020-07-15 09:32:08 +00:00
|
|
|
|
2020-07-15 07:27:11 +00:00
|
|
|
- name: Update permissions for note_kfet dir
|
|
|
|
file:
|
|
|
|
path: /var/www/note_kfet
|
|
|
|
state: directory
|
|
|
|
recurse: yes
|
|
|
|
owner: www-data
|
|
|
|
group: www-data
|
2020-08-05 21:19:30 +00:00
|
|
|
|
|
|
|
- name: Setup cron jobs
|
2020-09-06 08:32:52 +00:00
|
|
|
when: "note.cron_enabled"
|
2020-09-01 14:42:53 +00:00
|
|
|
template:
|
|
|
|
src: note.cron.j2
|
2020-08-05 21:19:30 +00:00
|
|
|
dest: /etc/cron.d/note
|
|
|
|
owner: root
|
|
|
|
group: root
|