fix: route codex acp setup on macos
This commit is contained in:
parent
dbbce5ff49
commit
2946a7bc42
@ -21,7 +21,7 @@ acp_codex_bridge_service_name: xworkmate-bridge
|
||||
acp_codex_bridge_local_source_dir: "{{ playbook_dir }}/../xworkmate-bridge"
|
||||
acp_codex_bridge_local_build_dir: "{{ playbook_dir }}/.artifacts/acp_codex"
|
||||
acp_codex_bridge_local_binary_path: "{{ acp_codex_bridge_local_build_dir }}/xworkmate-go-core"
|
||||
acp_codex_bridge_build_goos: linux
|
||||
acp_codex_bridge_build_goos: "{{ 'darwin' if ansible_os_family == 'Darwin' else 'linux' }}"
|
||||
acp_codex_bridge_build_goarch: "{{ 'arm64' if ansible_architecture in ['aarch64', 'arm64'] else 'amd64' }}"
|
||||
acp_codex_bridge_binary_path: /usr/local/bin/xworkmate-go-core
|
||||
acp_codex_bridge_use_prebuilt: "{{ lookup('ansible.builtin.env', 'AI_WORKSPACE_USE_PREBUILT_BRIDGE') | default('false', true) | bool }}"
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
ansible.builtin.command:
|
||||
cmd: chattr -i "{{ acp_codex_bridge_binary_path }}"
|
||||
when:
|
||||
- ansible_os_family != 'Darwin'
|
||||
- "'i' in (acp_codex_bridge_binary_attrs.stdout | default(''))"
|
||||
changed_when: true
|
||||
become: true
|
||||
@ -50,6 +51,7 @@
|
||||
ansible.builtin.command:
|
||||
cmd: chattr +i "{{ acp_codex_bridge_binary_path }}"
|
||||
when:
|
||||
- ansible_os_family != 'Darwin'
|
||||
- "'i' in (acp_codex_bridge_binary_attrs.stdout | default(''))"
|
||||
changed_when: true
|
||||
become: true
|
||||
@ -79,11 +81,13 @@
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
check_mode: false
|
||||
when: ansible_os_family != 'Darwin'
|
||||
|
||||
- name: Remove immutable flag from Codex ACP systemd service when present
|
||||
ansible.builtin.command:
|
||||
cmd: chattr -i "/etc/systemd/system/{{ acp_codex_service_name }}.service"
|
||||
when:
|
||||
- ansible_os_family != 'Darwin'
|
||||
- "'i' in (acp_codex_service_attrs.stdout | default(''))"
|
||||
changed_when: true
|
||||
become: true
|
||||
@ -96,11 +100,13 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: Restart acp codex
|
||||
when: ansible_os_family != 'Darwin'
|
||||
|
||||
- name: Restore immutable flag on Codex ACP systemd service
|
||||
ansible.builtin.command:
|
||||
cmd: chattr +i "/etc/systemd/system/{{ acp_codex_service_name }}.service"
|
||||
when:
|
||||
- ansible_os_family != 'Darwin'
|
||||
- "'i' in (acp_codex_service_attrs.stdout | default(''))"
|
||||
changed_when: true
|
||||
become: true
|
||||
@ -108,6 +114,7 @@
|
||||
- name: Reload systemd manager configuration
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
when: ansible_os_family != 'Darwin'
|
||||
|
||||
- name: Ensure Caddy is enabled and running
|
||||
ansible.builtin.systemd:
|
||||
@ -115,6 +122,7 @@
|
||||
enabled: true
|
||||
state: started
|
||||
when:
|
||||
- ansible_os_family != 'Darwin'
|
||||
- acp_codex_manage_caddy | bool
|
||||
|
||||
- name: Ensure Codex ACP service is enabled and running
|
||||
@ -124,3 +132,8 @@
|
||||
state: started
|
||||
when:
|
||||
- not ansible_check_mode
|
||||
- ansible_os_family != 'Darwin'
|
||||
|
||||
- name: Import macOS specific Codex ACP tasks
|
||||
ansible.builtin.import_tasks: macos.yml
|
||||
when: ansible_os_family == 'Darwin'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user