Compare commits

...

2 commits

13 changed files with 39 additions and 32 deletions

View file

@ -7,15 +7,15 @@
template:
src: docker-compose.yaml
dest: "{{ coturn_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: Template turnserver.conf to project directory
template:
src: turnserver.conf
dest: "{{ coturn_project_dir }}/turnserver.conf"
owner: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
mode: '640'
# Store result to restart services if the file changed
register: coturn_template_turnserver_result

View file

@ -42,9 +42,9 @@
regex: '^export DOCKER_HOST='
line: "export DOCKER_HOST=unix:///run/user/{{ host_uid }}/docker.sock"
- name: "Make sure lingering is enabled for user {{ ansible_env['USER'] }}"
- name: "Make sure lingering is enabled for user {{ host_uid }}"
command:
cmd: "loginctl enable-linger {{ ansible_env['USER'] }}"
cmd: "loginctl enable-linger {{ host_uid }}"
become: true
- name: "Create directory {{ ansible_env['HOME'] }}/.config/systemd/user/docker.service.d"

View file

@ -7,16 +7,16 @@
template:
src: docker-compose.yaml
dest: "{{ element_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: Template config.json to project directory
template:
src: config.json
dest: "{{ element_project_dir }}/config.json"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '644'
register: element_template_config_result

View file

@ -7,16 +7,16 @@
template:
src: docker-compose.yaml
dest: "{{ etebase_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: Template etebase-server.ini to project directory
template:
src: etebase-server.ini
dest: "{{ etebase_project_dir }}/etebase-server.ini"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '644'
- name: "Create directory {{ volumes['etebase_datadir'] }} with correct permissions"

View file

@ -7,8 +7,8 @@
template:
src: docker-compose.yaml
dest: "{{ hedgedoc_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: "Create directory {{ volumes['hedgedoc_configdir'] }} with correct permissions"

View file

@ -7,8 +7,8 @@
template:
src: docker-compose.yaml
dest: "{{ homepage_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: Pull project services

View file

@ -7,8 +7,8 @@
template:
src: docker-compose.yaml
dest: "{{ mailserver_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: "Create directory {{ volumes['mailserver_datadir'] }} with correct permissions"

View file

@ -7,16 +7,16 @@
template:
src: docker-compose.yaml
dest: "{{ searxng_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: Copy settings.yml and limiter.toml to project directory
copy:
src: "{{ role_path }}/files/"
dest: "{{ searxng_project_dir }}"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '644'
# Store result to restart services if the file(s) changed
register: searxng_copy_files_result

View file

@ -7,15 +7,15 @@
template:
src: docker-compose.yaml
dest: "{{ synapse_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: Template homeserver.yaml to project directory
template:
src: homeserver.yaml
dest: "{{ synapse_project_dir }}/homeserver.yaml"
owner: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
mode: '640'
# Store result to restart services if the file changed
register: synapse_template_homeserver_result

View file

@ -7,8 +7,8 @@
template:
src: docker-compose.yaml
dest: "{{ syncthing_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: Pull project services

View file

@ -18,6 +18,13 @@
environment:
BORG_PASSCOMMAND: "cat {{ borg_passphrase_file }}"
# The kuma-backup.db file is owned by root which causes
# users['uptime_kuma'] to try to take ownership when it cannot.
- name: Delete temporary backup file
file:
path: "{{ volumes['uptime_kuma_datadir'] }}/kuma-backup.db"
state: absent
- name: Prune borg repository
command:
cmd: |

View file

@ -7,8 +7,8 @@
template:
src: docker-compose.yaml
dest: "{{ uptime_kuma_project_dir }}/docker-compose.yaml"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
- name: "Create directory {{ volumes['uptime_kuma_datadir'] }} with correct permissions"

View file

@ -7,8 +7,8 @@
template:
src: "{{ item }}"
dest: "{{ vaultwarden_project_dir }}/{{ item }}"
owner: "{{ ansible_env['USER'] }}"
group: "{{ ansible_env['USER'] }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
loop:
- docker-compose.yaml