fimfarchive/operations/deluge/tasks/conf.yml
2018-07-29 22:34:07 +02:00

43 lines
845 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: Enabled service
command: systemctl enable deluged
when: result is changed