Add macOS development station playbook and role
- Created a new Ansible playbook for configuring macOS development stations. - Added role `macos_dev_station` with default variables, handlers, and tasks. - Implemented tasks for installing Homebrew packages, managing user configurations, and setting up launch agents for code-server and opencode. - Included templates for launchd plist files and startup scripts for code-server and opencode. - Added validation for required environment variables and configurations. - Updated inventory to include macOS hosts and added a setup script for initial prerequisites. - Modified Terraform configuration to include DNS records for new services.
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
---
|
||||
macos_dev_station_launchd_mode: "daemon" # daemon-only role
|
||||
macos_dev_station_service_user_enabled: true
|
||||
macos_dev_station_service_user: "devstation"
|
||||
macos_dev_station_service_group: "staff"
|
||||
macos_dev_station_service_shell: "/usr/bin/false"
|
||||
macos_dev_station_service_user_ssh_enabled: false
|
||||
macos_dev_station_service_user_ssh_shell: "/bin/zsh"
|
||||
macos_dev_station_service_user_ssh_authorized_keys: []
|
||||
macos_dev_station_service_home: "/Users/{{ macos_dev_station_service_user }}"
|
||||
|
||||
macos_dev_station_workspace_dir: "{{ macos_dev_station_service_home }}/projects"
|
||||
macos_dev_station_scripts_dir: "{{ macos_dev_station_service_home }}/scripts"
|
||||
macos_dev_station_logs_dir: "{{ macos_dev_station_service_home }}/Library/Logs"
|
||||
macos_dev_station_launchd_plist_dir: "/Library/LaunchDaemons"
|
||||
macos_dev_station_path: >-
|
||||
{{ macos_dev_station_service_home }}/.local/bin:{{ macos_dev_station_service_home }}/go/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
macos_dev_station_code_server_host: "0.0.0.0"
|
||||
macos_dev_station_code_server_port: 3000
|
||||
macos_dev_station_code_server_auth: "password"
|
||||
macos_dev_station_code_server_password: "{{ lookup('env', 'CODE_SERVER_PASSWORD', default='') }}"
|
||||
macos_dev_station_code_server_workspace: "{{ macos_dev_station_workspace_dir }}"
|
||||
macos_dev_station_code_server_extensions_enabled: true
|
||||
macos_dev_station_code_server_extensions_fail_on_error: false
|
||||
macos_dev_station_code_server_extensions:
|
||||
- ms-python.python
|
||||
- ms-python.vscode-pylance
|
||||
- ms-azuretools.vscode-docker
|
||||
- hashicorp.terraform
|
||||
- redhat.ansible
|
||||
- eamodio.gitlens
|
||||
|
||||
macos_dev_station_oh_my_zsh_enabled: true
|
||||
macos_dev_station_oh_my_zsh_install_url: "https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh"
|
||||
|
||||
macos_dev_station_colima_enabled: true
|
||||
macos_dev_station_colima_cpu: 4
|
||||
macos_dev_station_colima_memory: 8
|
||||
|
||||
macos_dev_station_brew_packages:
|
||||
- git
|
||||
- tmux
|
||||
- wget
|
||||
- curl
|
||||
- jq
|
||||
- openssl
|
||||
- uv
|
||||
- node
|
||||
- python
|
||||
- go
|
||||
- rust
|
||||
- docker
|
||||
- colima
|
||||
- code-server
|
||||
|
||||
macos_dev_station_npm_packages: []
|
||||
|
||||
macos_dev_station_git_init_default_branch: "main"
|
||||
macos_dev_station_git_pull_rebase: false
|
||||
|
||||
macos_dev_station_ssh_key_path: "{{ ansible_facts['env']['HOME'] }}/.ssh/id_ed25519"
|
||||
macos_dev_station_ssh_key_comment: "macmini-dev"
|
||||
|
||||
macos_dev_station_code_server_launchd_enabled: true
|
||||
macos_dev_station_opencode_launchd_enabled: true
|
||||
macos_dev_station_opencode_server_host: "127.0.0.1"
|
||||
macos_dev_station_opencode_server_port: 4096
|
||||
macos_dev_station_opencode_server_username: "{{ lookup('env', 'OPENCODE_SERVER_USERNAME', default='') }}"
|
||||
macos_dev_station_opencode_server_password: "{{ lookup('env', 'OPENCODE_SERVER_PASSWORD', default='') }}"
|
||||
macos_dev_station_opencode_extra_environment: {}
|
||||
macos_dev_station_opencode_command: "opencode serve --hostname {{ macos_dev_station_opencode_server_host }} --port {{ macos_dev_station_opencode_server_port }}"
|
||||
macos_dev_station_opencode_config: {}
|
||||
macos_dev_station_opencode_config_path: "{{ macos_dev_station_service_home }}/.config/opencode/opencode.json"
|
||||
|
||||
# MCP installer definitions
|
||||
# Supported kinds:
|
||||
# - npm: package + optional version
|
||||
# - uv: package + optional version + binary
|
||||
# - go: module + optional version + binary
|
||||
macos_dev_station_mcp_installers_enabled: true
|
||||
macos_dev_station_mcp_installers: []
|
||||
|
||||
# Legacy ad-hoc hook kept for backward compatibility.
|
||||
macos_dev_station_mcp_bootstrap_commands: []
|
||||
macos_dev_station_manage_launchd: true
|
||||
Reference in New Issue
Block a user