Files
ouranos/ansible/argos/deploy.yml
Robert Helewka 042df52bca Refactor user management in Ansible playbooks to standardize on keeper_user
- Updated user addition tasks across multiple playbooks (mcp_switchboard, mcpo, neo4j, neo4j_mcp, openwebui, postgresql, rabbitmq, searxng, smtp4dev) to replace references to ansible_user and remote_user with keeper_user.
- Modified PostgreSQL deployment to create directories and manage files under keeper_user's home.
- Enhanced documentation to clarify account taxonomy and usage of keeper_user in playbooks.
- Introduced new deployment for Agent S, including environment setup, desktop environment installation, XRDP configuration, and accessibility support.
- Added staging playbook for preparing release tarballs from local repositories.
- Created templates for XRDP configuration and environment activation scripts.
- Removed obsolete sunwait documentation.
2026-03-05 10:37:41 +00:00

77 lines
1.9 KiB
YAML

---
- name: Deploy Argos MCP Server
hosts: ubuntu
handlers:
- name: restart argos
become: true
community.docker.docker_compose_v2:
project_src: "{{argos_directory}}"
state: restarted
tasks:
- name: Check if host has argos service
ansible.builtin.set_fact:
has_argos_service: "{{ 'argos' in services | default([]) }}"
- name: Skip hosts without argos service
ansible.builtin.meta: end_host
when: not has_argos_service
- name: Create argos group
become: true
ansible.builtin.group:
name: "{{argos_group}}"
state: present
- name: Create argos user
become: true
ansible.builtin.user:
name: "{{argos_user}}"
group: "{{argos_group}}"
system: true
create_home: false
- name: Add keeper_user to argos group
become: true
ansible.builtin.user:
name: "{{keeper_user}}"
groups: "{{argos_group}}"
append: true
- name: Create argos directory
become: true
ansible.builtin.file:
path: "{{argos_directory}}"
owner: "{{argos_user}}"
group: "{{argos_group}}"
state: directory
mode: '750'
- name: Transfer and unarchive git archive
become: true
ansible.builtin.unarchive:
src: "~/rel/argos_{{argos_rel}}.tar"
dest: "{{argos_directory}}"
owner: "{{argos_user}}"
group: "{{argos_group}}"
mode: '550'
- name: Template docker-compose.yml
become: true
ansible.builtin.template:
src: docker-compose.yml.j2
dest: "{{argos_directory}}/docker-compose.yml"
owner: "{{argos_user}}"
group: "{{argos_group}}"
mode: '550'
notify: restart argos
- name: Start argos with docker-compose
become: true
community.docker.docker_compose_v2:
project_src: "{{argos_directory}}"
state: present
pull: always