mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-22 01:24:58 +02:00
- Update Next.js generated chunk hashes and build IDs reflecting latest dashboard build - Update CSS stylesheet references in workflow upload page metadata - Add comprehensive cloud setup E2E test suite (cloud_setup_test.go) with SSH password/key auth, post-command variable expansion, and Ansible integration - Fix API priority levels to include 'medium' priority in test coverage - Add agent-sdk test workflows (minimal, config, codex, multi-agent, session variants) - Update E2E test utilities with runCLIInBase helper for multi-step cloud config tests - Fix stderr/stdout capture in dependencies_target_types_test assertions
154 lines
4.5 KiB
YAML
154 lines
4.5 KiB
YAML
---
|
|
# Osmedeus Single-Host Deployment Playbook
|
|
# ==========================================
|
|
# Deploys Osmedeus on Ubuntu/Debian using the official install script.
|
|
#
|
|
# Usage:
|
|
# ansible-playbook -i inventory.ini deploy.yaml
|
|
#
|
|
# # With custom variables:
|
|
# ansible-playbook -i inventory.ini deploy.yaml \
|
|
# -e osm_admin_password=MySecurePass123 \
|
|
# -e osm_server_port=9090
|
|
#
|
|
# # Dry run:
|
|
# ansible-playbook -i inventory.ini deploy.yaml --check
|
|
|
|
- name: Deploy Osmedeus
|
|
hosts: osmedeus
|
|
become: true
|
|
|
|
vars:
|
|
# --- Installation ---
|
|
osm_user: root
|
|
osm_install_dir: /root/.osmedeus/binaries
|
|
osm_base_dir: /root/osmedeus-base
|
|
osm_workspaces_dir: /root/workspaces-osmedeus
|
|
|
|
# --- Server ---
|
|
osm_server_host: "0.0.0.0"
|
|
osm_server_port: 8002
|
|
osm_admin_user: admin
|
|
osm_admin_password: "CHANGE_ME_ADMIN_PASSWORD"
|
|
osm_jwt_secret: "CHANGE_ME_JWT_SECRET_MIN_32_CHARS"
|
|
osm_jwt_expiration_minutes: 1440
|
|
|
|
# --- Scan Threads ---
|
|
osm_threads_aggressive: 50
|
|
osm_threads_default: 20
|
|
osm_threads_gently: 5
|
|
|
|
# --- Systemd ---
|
|
osm_enable_service: true
|
|
|
|
# --- Notifications (optional) ---
|
|
osm_telegram_enabled: false
|
|
osm_telegram_bot_token: ""
|
|
osm_telegram_chat_id: ""
|
|
|
|
# --- Global Variables (optional) ---
|
|
# Example:
|
|
# osm_global_variables:
|
|
# - name: GITHUB_API_KEY
|
|
# value: "ghp_xxxx"
|
|
# as_env: true
|
|
osm_global_variables: []
|
|
|
|
tasks:
|
|
# =========================================================================
|
|
# 1. System Prerequisites
|
|
# =========================================================================
|
|
- name: Update apt cache
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
cache_valid_time: 3600
|
|
|
|
- name: Install system dependencies
|
|
ansible.builtin.apt:
|
|
name:
|
|
- curl
|
|
- tmux
|
|
- git
|
|
- unzip
|
|
- jq
|
|
- chromium-browser
|
|
- python3
|
|
state: present
|
|
|
|
# =========================================================================
|
|
# 2. Install Osmedeus
|
|
# =========================================================================
|
|
- name: Check if osmedeus is already installed
|
|
ansible.builtin.stat:
|
|
path: "{{ osm_install_dir }}/osmedeus"
|
|
register: osm_binary
|
|
|
|
- name: Install osmedeus via official install script
|
|
ansible.builtin.shell: |
|
|
curl -fsSL https://www.osmedeus.org/install.sh | bash
|
|
args:
|
|
creates: "{{ osm_install_dir }}/osmedeus"
|
|
when: not osm_binary.stat.exists
|
|
|
|
- name: Ensure osmedeus binary is in PATH
|
|
ansible.builtin.shell: |
|
|
osmedeus install env
|
|
changed_when: false
|
|
|
|
# =========================================================================
|
|
# 3. Configure
|
|
# =========================================================================
|
|
- name: Create workspaces directory
|
|
ansible.builtin.file:
|
|
path: "{{ osm_workspaces_dir }}"
|
|
state: directory
|
|
owner: "{{ osm_user }}"
|
|
mode: "0755"
|
|
|
|
- name: Deploy osm-settings.yaml
|
|
ansible.builtin.template:
|
|
src: templates/osm-settings.yaml.j2
|
|
dest: "{{ osm_base_dir }}/osm-settings.yaml"
|
|
owner: "{{ osm_user }}"
|
|
mode: "0600"
|
|
notify: restart osmedeus
|
|
|
|
# =========================================================================
|
|
# 4. Verify Installation
|
|
# =========================================================================
|
|
- name: Run osmedeus health check
|
|
ansible.builtin.command: "{{ osm_install_dir }}/osmedeus health"
|
|
register: health_result
|
|
changed_when: false
|
|
|
|
- name: Show health check output
|
|
ansible.builtin.debug:
|
|
var: health_result.stdout_lines
|
|
|
|
# =========================================================================
|
|
# 5. Systemd Service (optional)
|
|
# =========================================================================
|
|
- name: Deploy systemd service
|
|
ansible.builtin.template:
|
|
src: templates/osmedeus.service.j2
|
|
dest: /etc/systemd/system/osmedeus.service
|
|
mode: "0644"
|
|
when: osm_enable_service
|
|
notify: restart osmedeus
|
|
|
|
- name: Enable and start osmedeus service
|
|
ansible.builtin.systemd:
|
|
name: osmedeus
|
|
enabled: true
|
|
state: started
|
|
daemon_reload: true
|
|
when: osm_enable_service
|
|
|
|
handlers:
|
|
- name: restart osmedeus
|
|
ansible.builtin.systemd:
|
|
name: osmedeus
|
|
state: restarted
|
|
daemon_reload: true
|
|
when: osm_enable_service
|