mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 21:37:59 +01:00
44 lines
878 B
YAML
44 lines
878 B
YAML
---
|
|
#
|
|
# Configures Deluge.
|
|
#
|
|
|
|
- name: Create config directory
|
|
file:
|
|
path: "{{ deluge.conf }}"
|
|
mode: 0755
|
|
owner: "{{ deluge.user }}"
|
|
group: "{{ deluge.user }}"
|
|
state: directory
|
|
|
|
- name: Configure daemon
|
|
template:
|
|
src: config
|
|
dest: "{{ deluge.conf }}/core.conf"
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ deluge.user }}"
|
|
notify: Restart Deluge
|
|
|
|
- name: Configure authentication
|
|
lineinfile:
|
|
line: "{{ deluge.auth }}"
|
|
dest: "{{ deluge.conf }}/auth"
|
|
mode: 0640
|
|
owner: root
|
|
group: "{{ deluge.user }}"
|
|
create: yes
|
|
state: present
|
|
notify: Restart Deluge
|
|
|
|
- name: Install service
|
|
template:
|
|
src: service
|
|
dest: /etc/systemd/system/deluged.service
|
|
notify: Restart Deluge
|
|
register: result
|
|
|
|
- name: Enable service
|
|
# Needed to override SysV init.
|
|
command: systemctl enable deluged
|
|
when: result is changed
|