fimfarchive/operations/deluge/tasks/conf.yml
2018-09-03 19:54:10 +02:00

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