fimfarchive/operations/deluge/tasks/conf.yml

45 lines
878 B
YAML
Raw Normal View History

2018-07-29 22:05:38 +02:00
---
#
# 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
2018-09-03 19:54:10 +02:00
- name: Enable service
# Needed to override SysV init.
command: systemctl enable deluged
when: result is changed