2023-07-30 00:19:36 +00:00
|
|
|
---
|
|
|
|
- name: Install strfry binary
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "{{ ansible_env.HOME }}/src/strfry/strfry"
|
|
|
|
dest: "{{ strfry_binary_path }}"
|
|
|
|
mode: 0755
|
|
|
|
remote_src: true
|
|
|
|
|
|
|
|
- name: Setup strfry service unit
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: strfry.service
|
|
|
|
dest: /etc/systemd/system/strfry.service
|
|
|
|
notify: restart strfry
|
|
|
|
|
|
|
|
- name: Ensure strfry is enabled on boot
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: strfry
|
|
|
|
enabled: true
|
|
|
|
state: started
|
|
|
|
|
|
|
|
- name: Configure strfry
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: strfry.conf
|
|
|
|
dest: "{{ strfry_data_path }}/strfry.conf"
|
|
|
|
owner: "{{ strfry_system_user }}"
|
|
|
|
group: "{{ strfry_system_group }}"
|
|
|
|
when: not strfry_skip_config
|
2023-08-11 19:28:48 +00:00
|
|
|
tags: config
|
|
|
|
notify: restart strfry
|
|
|
|
|
|
|
|
- name: Configure basic strfry-policies only if a configuration does not already exist
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: strfry-policy.ts
|
|
|
|
dest: "{{ strfry_policies_path }}"
|
|
|
|
owner: "{{ strfry_system_user }}"
|
|
|
|
group: "{{ strfry_system_group }}"
|
|
|
|
when: not strfry_skip_config
|
2023-07-30 00:19:36 +00:00
|
|
|
tags: config
|
|
|
|
notify: restart strfry
|
|
|
|
|
|
|
|
- name: Ensure the configured database directory exists.
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ strfry_db }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ strfry_system_user }}"
|
|
|
|
group: "{{ strfry_system_group }}"
|
|
|
|
when: strfry_db.startswith('/')
|
|
|
|
|
|
|
|
- name: Ensure the configured database directory exists.
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ strfry_data_path }}/{{ strfry_db }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ strfry_system_user }}"
|
|
|
|
group: "{{ strfry_system_group }}"
|
2023-08-11 19:28:48 +00:00
|
|
|
when: not strfry_db.startswith('/')
|