2026-01-14 11:06:02 -08:00
|
|
|
---
|
|
|
|
|
- name: Install transmission-cli via homebrew
|
|
|
|
|
community.general.homebrew:
|
|
|
|
|
name: transmission-cli
|
|
|
|
|
state: present
|
|
|
|
|
|
|
|
|
|
- name: Ensure transmission download directory exists
|
|
|
|
|
ansible.builtin.file:
|
|
|
|
|
path: "{{ transmission_download_dir }}"
|
|
|
|
|
state: directory
|
|
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
|
|
- name: Ensure transmission incomplete directory exists
|
|
|
|
|
ansible.builtin.file:
|
|
|
|
|
path: "{{ transmission_incomplete_dir }}"
|
|
|
|
|
state: directory
|
|
|
|
|
mode: '0755'
|
|
|
|
|
|
2026-01-14 11:21:56 -08:00
|
|
|
- name: Remove old config directory (was deployed to wrong location)
|
2026-01-14 11:06:02 -08:00
|
|
|
ansible.builtin.file:
|
2026-01-14 11:21:56 -08:00
|
|
|
path: ~/.config/transmission-daemon
|
|
|
|
|
state: absent
|
2026-01-14 11:06:02 -08:00
|
|
|
|
|
|
|
|
- name: Stop transmission before config changes
|
|
|
|
|
ansible.builtin.command: brew services stop transmission-cli
|
|
|
|
|
register: brew_stop
|
|
|
|
|
changed_when: false
|
|
|
|
|
failed_when: false
|
|
|
|
|
|
|
|
|
|
- name: Deploy transmission settings.json
|
|
|
|
|
ansible.builtin.template:
|
|
|
|
|
src: settings.json.j2
|
|
|
|
|
dest: "{{ transmission_config_dir }}/settings.json"
|
|
|
|
|
mode: '0644'
|
|
|
|
|
notify: restart transmission
|
|
|
|
|
|
|
|
|
|
- name: Ensure transmission service is started
|
|
|
|
|
ansible.builtin.command: brew services start transmission-cli
|
|
|
|
|
register: brew_start
|
|
|
|
|
changed_when: "'Successfully started' in brew_start.stdout"
|
|
|
|
|
failed_when: false
|