--- # Post-provisioning customizations for OpenClaw VMs # Run after playbooks/install.yml to apply host-specific tweaks # # Usage: # ansible-playbook -i inventory.yml playbooks/customize.yml # ansible-playbook -i inventory.yml playbooks/customize.yml --limit zap - name: OpenClaw VM customizations hosts: openclaw_servers become: true tasks: - name: Set vm.swappiness=10 (live) ansible.posix.sysctl: name: vm.swappiness value: "10" state: present reload: true - name: Persist vm.swappiness in /etc/sysctl.conf ansible.builtin.lineinfile: path: /etc/sysctl.conf regexp: '^vm\.swappiness' line: 'vm.swappiness=10' state: present - name: Create virtiofs mount point ansible.builtin.file: path: /mnt/swarm state: directory mode: "0755" - name: Mount virtiofs swarm share via fstab ansible.posix.mount: path: /mnt/swarm src: swarm fstype: virtiofs opts: defaults state: present # Note: actual mount requires reboot after VM config update - name: Ensure openclaw user lingering is enabled (for user systemd services) ansible.builtin.command: cmd: loginctl enable-linger openclaw changed_when: false