2022-10-05 12:53:35 +02:00
|
|
|
---
|
|
|
|
# tasks file for outline
|
|
|
|
- name: Set up main directory
|
|
|
|
ansible.builtin.file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ item }}"
|
|
|
|
owner: "{{ ansible_effective_user_id }}"
|
|
|
|
group: "{{ ansible_effective_group_id }}"
|
|
|
|
mode: "0750"
|
|
|
|
with_items:
|
|
|
|
- "{{ outline_setup_path }}"
|
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Set up config directories
|
|
|
|
ansible.builtin.file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ item }}"
|
|
|
|
owner: "{% if outline_uid %}{{ outline_uid }}{% else %}{{ ansible_effective_user_id }}{% endif %}"
|
|
|
|
group: "{% if outline_gid %}{{ outline_gid }}{% else %}{{ ansible_effective_group_id }}{% endif %}"
|
|
|
|
mode: "0750"
|
|
|
|
with_items:
|
2022-12-11 00:55:45 +01:00
|
|
|
- "{{ outline_setup_path | expanduser | realpath }}"
|
|
|
|
- "{{ outline_volume_redis | expanduser | realpath }}"
|
|
|
|
- "{{ outline_volume_s3 | expanduser | realpath }}"
|
2022-12-11 02:18:36 +01:00
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
become: true
|
2022-12-08 18:34:40 +01:00
|
|
|
|
2022-12-11 02:18:36 +01:00
|
|
|
- name: Set up the database directory.
|
|
|
|
ansible.builtin.file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ item }}"
|
|
|
|
mode: "0755"
|
|
|
|
owner: 70
|
|
|
|
with_items:
|
|
|
|
- "{{ outline_volume_db | expanduser | realpath }}"
|
2022-10-05 12:53:35 +02:00
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Write configuration files
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ item }}.j2"
|
2022-12-11 00:55:45 +01:00
|
|
|
dest: "{{ outline_setup_path | expanduser | realpath }}/{{ item }}"
|
2022-10-05 12:53:35 +02:00
|
|
|
mode: '0640'
|
|
|
|
loop:
|
|
|
|
- "docker-compose.yml"
|
2022-12-08 01:51:55 +01:00
|
|
|
- "env.outline.conf"
|
|
|
|
- "env.db.conf"
|
|
|
|
- "env.oidc.conf"
|
|
|
|
- "env.redis.conf"
|
|
|
|
- "env.s3.conf"
|
2022-10-05 12:53:35 +02:00
|
|
|
tags:
|
|
|
|
- configuration
|
|
|
|
|
|
|
|
- name: Ensure all requested components are running.
|
|
|
|
community.docker.docker_compose:
|
2022-12-11 00:55:45 +01:00
|
|
|
project_src: "{{ outline_setup_path | expanduser | realpath }}"
|
2022-10-05 12:53:35 +02:00
|
|
|
build: false
|
|
|
|
become: false
|