Replaces the minimal project description with a comprehensive README including a component overview table, quick start instructions, common Ansible operations, and links to detailed documentation. Aligns with Red Panda Approval™ standards.
77 lines
1.9 KiB
YAML
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 ansible user to argos group
|
|
become: true
|
|
ansible.builtin.user:
|
|
name: "{{ansible_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
|
|
|