2022-12-18 23:43:40 +01:00
|
|
|
---
|
2022-12-16 23:57:38 +01:00
|
|
|
- name: "set the user variables"
|
|
|
|
ansible.builtin.import_role:
|
2022-12-18 19:36:21 +01:00
|
|
|
name: "services/include"
|
2022-12-16 23:57:38 +01:00
|
|
|
vars_from: "user"
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
2023-08-18 13:01:36 +02:00
|
|
|
- name: "{{ services_service_name }} : configure hosts file"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "hosts"
|
|
|
|
dest: "{{ services_service_user_home }}/.config/service/hosts"
|
|
|
|
mode: 0644
|
|
|
|
register: services_deploy_cloud_hosts_file
|
|
|
|
|
2022-12-16 23:57:38 +01:00
|
|
|
- name: "configure nginx"
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "./config/nginx.conf"
|
2023-07-18 23:18:00 +02:00
|
|
|
dest: "{{ services_service_user_home }}/.config/service/nginx.conf"
|
2022-12-16 23:57:38 +01:00
|
|
|
mode: 0644
|
|
|
|
register: services_deploy_cloud_config_files
|
|
|
|
|
|
|
|
- name: "configure nextcloud secrets"
|
|
|
|
ansible.builtin.template:
|
2023-07-08 10:04:37 +02:00
|
|
|
src: "./nextcloud/{{ item }}"
|
2023-07-18 23:18:00 +02:00
|
|
|
dest: "{{ services_service_user_home }}/.config/service/{{ item }}"
|
2022-12-16 23:57:38 +01:00
|
|
|
mode: 0600
|
|
|
|
loop:
|
|
|
|
- "database.name"
|
|
|
|
- "database.password"
|
|
|
|
- "database.user"
|
|
|
|
register: services_deploy_cloud_nextcloud_files
|
|
|
|
|
|
|
|
become_user: "{{ services_service_user_name }}"
|
2023-11-11 21:54:08 +01:00
|
|
|
|
|
|
|
- name: "{{ services_service_name }} : configure systemd service"
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: "services/deploy/pod"
|
|
|
|
vars:
|
|
|
|
services_deploy_pod_needs_restart: "{{
|
|
|
|
services_deploy_cloud_hosts_file.changed or
|
|
|
|
services_deploy_cloud_config_files.changed or
|
|
|
|
services_deploy_cloud_nextcloud_files.changed
|
|
|
|
}}"
|