- Homebrew's transmission-cli service uses /opt/homebrew/var/transmission/ not ~/.config/transmission-daemon/ - Add task to clean up old config directory - Update zettelkasten with correct paths Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
---
|
|
- 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'
|
|
|
|
- name: Remove old config directory (was deployed to wrong location)
|
|
ansible.builtin.file:
|
|
path: ~/.config/transmission-daemon
|
|
state: absent
|
|
|
|
- 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
|