Compare commits

..

2 commits

13 changed files with 39 additions and 32 deletions

View file

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

View file

@ -42,9 +42,9 @@
regex: '^export DOCKER_HOST=' regex: '^export DOCKER_HOST='
line: "export DOCKER_HOST=unix:///run/user/{{ host_uid }}/docker.sock" 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: command:
cmd: "loginctl enable-linger {{ ansible_env['USER'] }}" cmd: "loginctl enable-linger {{ host_uid }}"
become: true become: true
- name: "Create directory {{ ansible_env['HOME'] }}/.config/systemd/user/docker.service.d" - name: "Create directory {{ ansible_env['HOME'] }}/.config/systemd/user/docker.service.d"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -18,6 +18,13 @@
environment: environment:
BORG_PASSCOMMAND: "cat {{ borg_passphrase_file }}" 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 - name: Prune borg repository
command: command:
cmd: | cmd: |

View file

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

View file

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