61 lines
2.1 KiB
YAML
61 lines
2.1 KiB
YAML
|
|
---
|
||
|
|
- name: Unload code-server launch agent if already loaded
|
||
|
|
become: true
|
||
|
|
ansible.builtin.command: >-
|
||
|
|
launchctl bootout system {{ macos_dev_station_launchd_plist_dir }}/com.a13labs.code-server.plist
|
||
|
|
failed_when: false
|
||
|
|
changed_when: false
|
||
|
|
when:
|
||
|
|
- macos_dev_station_manage_launchd | bool
|
||
|
|
- macos_dev_station_code_server_launchd_enabled | bool
|
||
|
|
listen: Restart code-server launch agent
|
||
|
|
|
||
|
|
- name: Load code-server launch agent
|
||
|
|
become: true
|
||
|
|
ansible.builtin.command: >-
|
||
|
|
launchctl bootstrap system {{ macos_dev_station_launchd_plist_dir }}/com.a13labs.code-server.plist
|
||
|
|
changed_when: true
|
||
|
|
when:
|
||
|
|
- macos_dev_station_manage_launchd | bool
|
||
|
|
- macos_dev_station_code_server_launchd_enabled | bool
|
||
|
|
listen: Restart code-server launch agent
|
||
|
|
|
||
|
|
- name: Enable code-server launch agent
|
||
|
|
become: true
|
||
|
|
ansible.builtin.command: launchctl enable system/com.a13labs.code-server
|
||
|
|
changed_when: false
|
||
|
|
when:
|
||
|
|
- macos_dev_station_manage_launchd | bool
|
||
|
|
- macos_dev_station_code_server_launchd_enabled | bool
|
||
|
|
listen: Restart code-server launch agent
|
||
|
|
|
||
|
|
- name: Unload opencode launch agent if already loaded
|
||
|
|
become: true
|
||
|
|
ansible.builtin.command: >-
|
||
|
|
launchctl bootout system {{ macos_dev_station_launchd_plist_dir }}/com.a13labs.opencode.plist
|
||
|
|
failed_when: false
|
||
|
|
changed_when: false
|
||
|
|
when:
|
||
|
|
- macos_dev_station_manage_launchd | bool
|
||
|
|
- macos_dev_station_opencode_launchd_enabled | bool
|
||
|
|
listen: Restart opencode launch agent
|
||
|
|
|
||
|
|
- name: Load opencode launch agent
|
||
|
|
become: true
|
||
|
|
ansible.builtin.command: >-
|
||
|
|
launchctl bootstrap system {{ macos_dev_station_launchd_plist_dir }}/com.a13labs.opencode.plist
|
||
|
|
changed_when: true
|
||
|
|
when:
|
||
|
|
- macos_dev_station_manage_launchd | bool
|
||
|
|
- macos_dev_station_opencode_launchd_enabled | bool
|
||
|
|
listen: Restart opencode launch agent
|
||
|
|
|
||
|
|
- name: Enable opencode launch agent
|
||
|
|
become: true
|
||
|
|
ansible.builtin.command: launchctl enable system/com.a13labs.opencode
|
||
|
|
changed_when: false
|
||
|
|
when:
|
||
|
|
- macos_dev_station_manage_launchd | bool
|
||
|
|
- macos_dev_station_opencode_launchd_enabled | bool
|
||
|
|
listen: Restart opencode launch agent
|