Initial commit — OpenClaw VM infrastructure
- ansible/: VM provisioning playbooks and roles - provision-vm.yml: create KVM VM from Ubuntu cloud image - install.yml: install OpenClaw on guest (upstream) - customize.yml: swappiness, virtiofs fstab, linger - roles/vm/: libvirt domain XML, cloud-init templates - inventory.yml + host_vars/zap.yml: zap instance config - backup-openclaw-vm.sh: daily rsync + MinIO upload - restore-openclaw-vm.sh: full redeploy from scratch - README.md: full operational documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
39
ansible/playbooks/deploy.yml
Normal file
39
ansible/playbooks/deploy.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
- name: Deploy OpenClaw to remote servers
|
||||
hosts: openclaw_servers
|
||||
become: true
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
pre_tasks:
|
||||
- name: Detect operating system
|
||||
ansible.builtin.set_fact:
|
||||
is_linux: "{{ ansible_system == 'Linux' }}"
|
||||
is_debian_family: "{{ ansible_os_family == 'Debian' }}"
|
||||
is_supported_distro: "{{ ansible_distribution in ['Debian', 'Ubuntu'] }}"
|
||||
|
||||
- name: Fail on unsupported non-Linux systems
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Unsupported operating system: {{ ansible_system }}.
|
||||
This installer supports Linux only.
|
||||
when: not is_linux
|
||||
|
||||
- name: Fail on unsupported Linux distribution
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Unsupported Linux distribution: {{ ansible_distribution }} {{ ansible_distribution_version }}.
|
||||
This installer currently supports Debian and Ubuntu.
|
||||
when:
|
||||
- is_linux
|
||||
- not is_supported_distro
|
||||
|
||||
- name: Install ACL for privilege escalation
|
||||
ansible.builtin.package:
|
||||
name: acl
|
||||
state: present
|
||||
when: is_supported_distro
|
||||
|
||||
roles:
|
||||
- openclaw
|
||||
Reference in New Issue
Block a user