[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75DJ09R3Y24TGVC5H8A1K7C":3,"skill-same:01M75DJ09R3Y24TGVC5H8A1K7C":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M75DJ09R3Y24TGVC5H8A1K7C","ansible",null,"Infrastructure automation with Ansible. Use for server provisioning, configuration management, application deployment, and multi-host orchestration. Includes playbooks for OpenClaw VPS setup, security hardening, and common server configurations.","javimosch\u002Fopen-claw-skills","javimosch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12900508?v=4","01M6D3F2AS6PV75ET9PZ1QGP8J","Javier Leandro Arancibia","01M75B8NCTAJG9WH5YNZH7C3D8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fbotond-rackhost\u002Fansible-skill\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: ansible\ndescription: \"Infrastructure automation with Ansible. Use for server provisioning, configuration management, application deployment, and multi-host orchestration. Includes playbooks for OpenClaw VPS setup, security hardening, and common server configurations.\"\nmetadata: {\"openclaw\":{\"requires\":{\"bins\":[\"ansible\",\"ansible-playbook\"]},\"install\":[{\"id\":\"ansible\",\"kind\":\"pip\",\"package\":\"ansible\",\"bins\":[\"ansible\",\"ansible-playbook\"],\"label\":\"Install Ansible (pip)\"}]}}\n---\n\n# Ansible Skill\n\nInfrastructure as Code automation for server provisioning, configuration management, and orchestration.\n\n## Quick Start\n\n### Prerequisites\n\n```bash\n# Install Ansible\npip install ansible\n\n# Or on macOS\nbrew install ansible\n\n# Verify\nansible --version\n```\n\n### Run Your First Playbook\n\n```bash\n# Test connection\nansible all -i inventory\u002Fhosts.yml -m ping\n\n# Run playbook\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fsite.yml\n\n# Dry run (check mode)\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fsite.yml --check\n\n# With specific tags\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fsite.yml --tags \"security,nodejs\"\n```\n\n## Directory Structure\n\n```\nskills\u002Fansible\u002F\n├── SKILL.md              # This file\n├── inventory\u002F            # Host inventories\n│   ├── hosts.yml         # Main inventory\n│   └── group_vars\u002F       # Group variables\n├── playbooks\u002F            # Runnable playbooks\n│   ├── site.yml          # Master playbook\n│   ├── openclaw-vps.yml  # OpenClaw VPS setup\n│   └── security.yml      # Security hardening\n├── roles\u002F                # Reusable roles\n│   ├── common\u002F           # Base system setup\n│   ├── security\u002F         # Hardening (SSH, fail2ban, UFW)\n│   ├── nodejs\u002F           # Node.js installation\n│   └── openclaw\u002F         # OpenClaw installation\n└── references\u002F           # Documentation\n    ├── best-practices.md\n    ├── modules-cheatsheet.md\n    └── troubleshooting.md\n```\n\n## Core Concepts\n\n### Inventory\n\nDefine your hosts in `inventory\u002Fhosts.yml`:\n\n```yaml\nall:\n  children:\n    vps:\n      hosts:\n        eva:\n          ansible_host: 217.13.104.208\n          ansible_user: root\n          ansible_ssh_pass: \"{{ vault_eva_password }}\"\n        plane:\n          ansible_host: 217.13.104.99\n          ansible_user: asdbot\n          ansible_ssh_private_key_file: ~\u002F.ssh\u002Fid_ed25519_plane\n    \n    openclaw:\n      hosts:\n        eva:\n```\n\n### Playbooks\n\nEntry points for automation:\n\n```yaml\n# playbooks\u002Fsite.yml - Master playbook\n---\n- name: Configure all servers\n  hosts: all\n  become: yes\n  roles:\n    - common\n    - security\n\n- name: Setup OpenClaw servers\n  hosts: openclaw\n  become: yes\n  roles:\n    - nodejs\n    - openclaw\n```\n\n### Roles\n\nReusable, modular configurations:\n\n```yaml\n# roles\u002Fcommon\u002Ftasks\u002Fmain.yml\n---\n- name: Update apt cache\n  ansible.builtin.apt:\n    update_cache: yes\n    cache_valid_time: 3600\n  when: ansible_os_family == \"Debian\"\n\n- name: Install essential packages\n  ansible.builtin.apt:\n    name:\n      - curl\n      - wget\n      - git\n      - htop\n      - vim\n      - unzip\n    state: present\n```\n\n## Included Roles\n\n### 1. common\nBase system configuration:\n- System updates\n- Essential packages\n- Timezone configuration\n- User creation with SSH keys\n\n### 2. security\nHardening following CIS benchmarks:\n- SSH hardening (key-only, no root)\n- fail2ban for brute-force protection\n- UFW firewall configuration\n- Automatic security updates\n\n### 3. nodejs\nNode.js installation via NodeSource:\n- Configurable version (default: 22.x LTS)\n- npm global packages\n- pm2 process manager (optional)\n\n### 4. openclaw\nComplete OpenClaw setup:\n- Node.js (via nodejs role)\n- OpenClaw npm installation\n- Systemd service\n- Configuration file setup\n\n## Usage Patterns\n\n### Pattern 1: New VPS Setup (OpenClaw)\n\n```bash\n# 1. Add host to inventory\ncat >> inventory\u002Fhosts.yml \u003C\u003C 'EOF'\n        newserver:\n          ansible_host: 1.2.3.4\n          ansible_user: root\n          ansible_ssh_pass: \"initial_password\"\n          deploy_user: asdbot\n          deploy_ssh_pubkey: \"ssh-ed25519 AAAA... asdbot\"\nEOF\n\n# 2. Run OpenClaw playbook\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fopenclaw-vps.yml \\\n  --limit newserver \\\n  --ask-vault-pass\n\n# 3. After initial setup, update inventory to use key auth\n# ansible_user: asdbot\n# ansible_ssh_private_key_file: ~\u002F.ssh\u002Fid_ed25519\n```\n\n### Pattern 2: Security Hardening Only\n\n```bash\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fsecurity.yml \\\n  --limit production \\\n  --tags \"ssh,firewall\"\n```\n\n### Pattern 3: Rolling Updates\n\n```bash\n# Update one server at a time\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fupdate.yml \\\n  --serial 1\n```\n\n### Pattern 4: Ad-hoc Commands\n\n```bash\n# Check disk space on all servers\nansible all -i inventory\u002Fhosts.yml -m shell -a \"df -h\"\n\n# Restart service\nansible openclaw -i inventory\u002Fhosts.yml -m systemd -a \"name=openclaw state=restarted\"\n\n# Copy file\nansible all -i inventory\u002Fhosts.yml -m copy -a \"src=.\u002Ffile.txt dest=\u002Ftmp\u002F\"\n```\n\n## Variables & Secrets\n\n### Group Variables\n\n```yaml\n# inventory\u002Fgroup_vars\u002Fall.yml\n---\ntimezone: Europe\u002FBudapest\ndeploy_user: asdbot\nssh_port: 22\n\n# Security\nsecurity_ssh_password_auth: false\nsecurity_ssh_permit_root: false\nsecurity_fail2ban_enabled: true\nsecurity_ufw_enabled: true\nsecurity_ufw_allowed_ports:\n  - 22\n  - 80\n  - 443\n\n# Node.js\nnodejs_version: \"22.x\"\n```\n\n### Vault for Secrets\n\n```bash\n# Create encrypted vars file\nansible-vault create inventory\u002Fgroup_vars\u002Fall\u002Fvault.yml\n\n# Edit encrypted file\nansible-vault edit inventory\u002Fgroup_vars\u002Fall\u002Fvault.yml\n\n# Run with vault\nansible-playbook site.yml --ask-vault-pass\n\n# Or use vault password file\nansible-playbook site.yml --vault-password-file ~\u002F.vault_pass\n```\n\nVault file structure:\n```yaml\n# inventory\u002Fgroup_vars\u002Fall\u002Fvault.yml\n---\nvault_eva_password: \"y8UGHR1qH\"\nvault_deploy_ssh_key: |\n  -----BEGIN OPENSSH PRIVATE KEY-----\n  ...\n  -----END OPENSSH PRIVATE KEY-----\n```\n\n## Common Modules\n\n| Module | Purpose | Example |\n|--------|---------|---------|\n| `apt` | Package management (Debian) | `apt: name=nginx state=present` |\n| `yum` | Package management (RHEL) | `yum: name=nginx state=present` |\n| `copy` | Copy files | `copy: src=file dest=\u002Fpath\u002F` |\n| `template` | Template files (Jinja2) | `template: src=nginx.conf.j2 dest=\u002Fetc\u002Fnginx\u002Fnginx.conf` |\n| `file` | File\u002Fdirectory management | `file: path=\u002Fdir state=directory mode=0755` |\n| `user` | User management | `user: name=asdbot groups=sudo shell=\u002Fbin\u002Fbash` |\n| `authorized_key` | SSH keys | `authorized_key: user=asdbot key=\"{{ ssh_key }}\"` |\n| `systemd` | Service management | `systemd: name=nginx state=started enabled=yes` |\n| `ufw` | Firewall (Ubuntu) | `ufw: rule=allow port=22 proto=tcp` |\n| `lineinfile` | Edit single line | `lineinfile: path=\u002Fetc\u002Fssh\u002Fsshd_config regexp='^PermitRootLogin' line='PermitRootLogin no'` |\n| `git` | Clone repos | `git: repo=https:\u002F\u002Fgithub.com\u002Fx\u002Fy.git dest=\u002Fopt\u002Fy` |\n| `npm` | npm packages | `npm: name=openclaw global=yes` |\n| `command` | Run command | `command: \u002Fopt\u002Fscript.sh` |\n| `shell` | Run shell command | `shell: cat \u002Fetc\u002Fpasswd \\| grep root` |\n\n## Best Practices\n\n### 1. Always Name Tasks\n```yaml\n# Good\n- name: Install nginx web server\n  apt:\n    name: nginx\n    state: present\n\n# Bad\n- apt: name=nginx\n```\n\n### 2. Use FQCN (Fully Qualified Collection Names)\n```yaml\n# Good\n- ansible.builtin.apt:\n    name: nginx\n\n# Acceptable but less clear\n- apt:\n    name: nginx\n```\n\n### 3. Explicit State\n```yaml\n# Good - explicit state\n- ansible.builtin.apt:\n    name: nginx\n    state: present\n\n# Bad - implicit state\n- ansible.builtin.apt:\n    name: nginx\n```\n\n### 4. Idempotency\nWrite tasks that can run multiple times safely:\n```yaml\n# Good - idempotent\n- name: Ensure config line exists\n  ansible.builtin.lineinfile:\n    path: \u002Fetc\u002Fssh\u002Fsshd_config\n    regexp: '^PasswordAuthentication'\n    line: 'PasswordAuthentication no'\n\n# Bad - not idempotent\n- name: Add config line\n  ansible.builtin.shell: echo \"PasswordAuthentication no\" >> \u002Fetc\u002Fssh\u002Fsshd_config\n```\n\n### 5. Use Handlers for Restarts\n```yaml\n# tasks\u002Fmain.yml\n- name: Update SSH config\n  ansible.builtin.template:\n    src: sshd_config.j2\n    dest: \u002Fetc\u002Fssh\u002Fsshd_config\n  notify: Restart SSH\n\n# handlers\u002Fmain.yml\n- name: Restart SSH\n  ansible.builtin.systemd:\n    name: sshd\n    state: restarted\n```\n\n### 6. Tags for Selective Runs\n```yaml\n- name: Security tasks\n  ansible.builtin.include_tasks: security.yml\n  tags: [security, hardening]\n\n- name: App deployment\n  ansible.builtin.include_tasks: deploy.yml\n  tags: [deploy, app]\n```\n\n## Troubleshooting\n\n### Connection Issues\n\n```bash\n# Test SSH connection manually\nssh -v user@host\n\n# Debug Ansible connection\nansible host -i inventory -m ping -vvv\n\n# Check inventory parsing\nansible-inventory -i inventory --list\n```\n\n### Common Errors\n\n**\"Permission denied\"**\n- Check SSH key permissions: `chmod 600 ~\u002F.ssh\u002Fid_*`\n- Verify user has sudo access\n- Add `become: yes` to playbook\n\n**\"Host key verification failed\"**\n- Add to ansible.cfg: `host_key_checking = False`\n- Or add host key: `ssh-keyscan -H host >> ~\u002F.ssh\u002Fknown_hosts`\n\n**\"Module not found\"**\n- Use FQCN: `ansible.builtin.apt` instead of `apt`\n- Install collection: `ansible-galaxy collection install community.general`\n\n### Debugging Playbooks\n\n```bash\n# Verbose output\nansible-playbook site.yml -v    # Basic\nansible-playbook site.yml -vv   # More\nansible-playbook site.yml -vvv  # Maximum\n\n# Step through tasks\nansible-playbook site.yml --step\n\n# Start at specific task\nansible-playbook site.yml --start-at-task=\"Install nginx\"\n\n# Check mode (dry run)\nansible-playbook site.yml --check --diff\n```\n\n## Integration with OpenClaw\n\n### From OpenClaw Agent\n\n```bash\n# Run playbook via exec tool\nexec command=\"ansible-playbook -i skills\u002Fansible\u002Finventory\u002Fhosts.yml skills\u002Fansible\u002Fplaybooks\u002Fopenclaw-vps.yml --limit eva\"\n\n# Ad-hoc command\nexec command=\"ansible eva -i skills\u002Fansible\u002Finventory\u002Fhosts.yml -m shell -a 'systemctl status openclaw'\"\n```\n\n### Storing Credentials\n\nUse OpenClaw's Vaultwarden integration:\n```bash\n# Get password from vault cache\nPASSWORD=$(.secrets\u002Fget-secret.sh \"VPS - Eva\")\n\n# Use in ansible (not recommended - use ansible-vault instead)\nansible-playbook site.yml -e \"ansible_ssh_pass=$PASSWORD\"\n```\n\nBetter: Store in Ansible Vault and use `--ask-vault-pass`.\n\n## References\n\n- `references\u002Fbest-practices.md` - Detailed best practices guide\n- `references\u002Fmodules-cheatsheet.md` - Common modules quick reference\n- `references\u002Ftroubleshooting.md` - Extended troubleshooting guide\n\n## External Resources\n\n- [Ansible Documentation](https:\u002F\u002Fdocs.ansible.com\u002F)\n- [Ansible Galaxy](https:\u002F\u002Fgalaxy.ansible.com\u002F) - Community roles\n- [geerlingguy roles](https:\u002F\u002Fgithub.com\u002Fgeerlingguy?tab=repositories&q=ansible-role) - High quality roles\n- [Ansible for DevOps](https:\u002F\u002Fwww.ansiblefordevops.com\u002F) - Book by Jeff Geerling\n","# Ansible Skill\n\nInfrastructure as Code automation for server provisioning, configuration management, and orchestration.\n\n## Quick Start\n\n### Prerequisites\n\n```bash\n# Install Ansible\npip install ansible\n\n# Or on macOS\nbrew install ansible\n\n# Verify\nansible --version\n```\n\n### Run Your First Playbook\n\n```bash\n# Test connection\nansible all -i inventory\u002Fhosts.yml -m ping\n\n# Run playbook\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fsite.yml\n\n# Dry run (check mode)\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fsite.yml --check\n\n# With specific tags\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fsite.yml --tags \"security,nodejs\"\n```\n\n## Directory Structure\n\n```\nskills\u002Fansible\u002F\n├── SKILL.md              # This file\n├── inventory\u002F            # Host inventories\n│   ├── hosts.yml         # Main inventory\n│   └── group_vars\u002F       # Group variables\n├── playbooks\u002F            # Runnable playbooks\n│   ├── site.yml          # Master playbook\n│   ├── openclaw-vps.yml  # OpenClaw VPS setup\n│   └── security.yml      # Security hardening\n├── roles\u002F                # Reusable roles\n│   ├── common\u002F           # Base system setup\n│   ├── security\u002F         # Hardening (SSH, fail2ban, UFW)\n│   ├── nodejs\u002F           # Node.js installation\n│   └── openclaw\u002F         # OpenClaw installation\n└── references\u002F           # Documentation\n    ├── best-practices.md\n    ├── modules-cheatsheet.md\n    └── troubleshooting.md\n```\n\n## Core Concepts\n\n### Inventory\n\nDefine your hosts in `inventory\u002Fhosts.yml`:\n\n```yaml\nall:\n  children:\n    vps:\n      hosts:\n        eva:\n          ansible_host: 217.13.104.208\n          ansible_user: root\n          ansible_ssh_pass: \"{{ vault_eva_password }}\"\n        plane:\n          ansible_host: 217.13.104.99\n          ansible_user: asdbot\n          ansible_ssh_private_key_file: ~\u002F.ssh\u002Fid_ed25519_plane\n    \n    openclaw:\n      hosts:\n        eva:\n```\n\n### Playbooks\n\nEntry points for automation:\n\n```yaml\n# playbooks\u002Fsite.yml - Master playbook\n---\n- name: Configure all servers\n  hosts: all\n  become: yes\n  roles:\n    - common\n    - security\n\n- name: Setup OpenClaw servers\n  hosts: openclaw\n  become: yes\n  roles:\n    - nodejs\n    - openclaw\n```\n\n### Roles\n\nReusable, modular configurations:\n\n```yaml\n# roles\u002Fcommon\u002Ftasks\u002Fmain.yml\n---\n- name: Update apt cache\n  ansible.builtin.apt:\n    update_cache: yes\n    cache_valid_time: 3600\n  when: ansible_os_family == \"Debian\"\n\n- name: Install essential packages\n  ansible.builtin.apt:\n    name:\n      - curl\n      - wget\n      - git\n      - htop\n      - vim\n      - unzip\n    state: present\n```\n\n## Included Roles\n\n### 1. common\nBase system configuration:\n- System updates\n- Essential packages\n- Timezone configuration\n- User creation with SSH keys\n\n### 2. security\nHardening following CIS benchmarks:\n- SSH hardening (key-only, no root)\n- fail2ban for brute-force protection\n- UFW firewall configuration\n- Automatic security updates\n\n### 3. nodejs\nNode.js installation via NodeSource:\n- Configurable version (default: 22.x LTS)\n- npm global packages\n- pm2 process manager (optional)\n\n### 4. openclaw\nComplete OpenClaw setup:\n- Node.js (via nodejs role)\n- OpenClaw npm installation\n- Systemd service\n- Configuration file setup\n\n## Usage Patterns\n\n### Pattern 1: New VPS Setup (OpenClaw)\n\n```bash\n# 1. Add host to inventory\ncat >> inventory\u002Fhosts.yml \u003C\u003C 'EOF'\n        newserver:\n          ansible_host: 1.2.3.4\n          ansible_user: root\n          ansible_ssh_pass: \"initial_password\"\n          deploy_user: asdbot\n          deploy_ssh_pubkey: \"ssh-ed25519 AAAA... asdbot\"\nEOF\n\n# 2. Run OpenClaw playbook\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fopenclaw-vps.yml \\\n  --limit newserver \\\n  --ask-vault-pass\n\n# 3. After initial setup, update inventory to use key auth\n# ansible_user: asdbot\n# ansible_ssh_private_key_file: ~\u002F.ssh\u002Fid_ed25519\n```\n\n### Pattern 2: Security Hardening Only\n\n```bash\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fsecurity.yml \\\n  --limit production \\\n  --tags \"ssh,firewall\"\n```\n\n### Pattern 3: Rolling Updates\n\n```bash\n# Update one server at a time\nansible-playbook -i inventory\u002Fhosts.yml playbooks\u002Fupdate.yml \\\n  --serial 1\n```\n\n### Pattern 4: Ad-hoc Commands\n\n```bash\n# Check disk space on all servers\nansible all -i inventory\u002Fhosts.yml -m shell -a \"df -h\"\n\n# Restart service\nansible openclaw -i inventory\u002Fhosts.yml -m systemd -a \"name=openclaw state=restarted\"\n\n# Copy file\nansible all -i inventory\u002Fhosts.yml -m copy -a \"src=.\u002Ffile.txt dest=\u002Ftmp\u002F\"\n```\n\n## Variables & Secrets\n\n### Group Variables\n\n```yaml\n# inventory\u002Fgroup_vars\u002Fall.yml\n---\ntimezone: Europe\u002FBudapest\ndeploy_user: asdbot\nssh_port: 22\n\n# Security\nsecurity_ssh_password_auth: false\nsecurity_ssh_permit_root: false\nsecurity_fail2ban_enabled: true\nsecurity_ufw_enabled: true\nsecurity_ufw_allowed_ports:\n  - 22\n  - 80\n  - 443\n\n# Node.js\nnodejs_version: \"22.x\"\n```\n\n### Vault for Secrets\n\n```bash\n# Create encrypted vars file\nansible-vault create inventory\u002Fgroup_vars\u002Fall\u002Fvault.yml\n\n# Edit encrypted file\nansible-vault edit inventory\u002Fgroup_vars\u002Fall\u002Fvault.yml\n\n# Run with vault\nansible-playbook site.yml --ask-vault-pass\n\n# Or use vault password file\nansible-playbook site.yml --vault-password-file ~\u002F.vault_pass\n```\n\nVault file structure:\n```yaml\n# inventory\u002Fgroup_vars\u002Fall\u002Fvault.yml\n---\nvault_eva_password: \"y8UGHR1qH\"\nvault_deploy_ssh_key: |\n  -----BEGIN OPENSSH PRIVATE KEY-----\n  ...\n  -----END OPENSSH PRIVATE KEY-----\n```\n\n## Common Modules\n\n| Module | Purpose | Example |\n|--------|---------|---------|\n| `apt` | Package management (Debian) | `apt: name=nginx state=present` |\n| `yum` | Package management (RHEL) | `yum: name=nginx state=present` |\n| `copy` | Copy files | `copy: src=file dest=\u002Fpath\u002F` |\n| `template` | Template files (Jinja2) | `template: src=nginx.conf.j2 dest=\u002Fetc\u002Fnginx\u002Fnginx.conf` |\n| `file` | File\u002Fdirectory management | `file: path=\u002Fdir state=directory mode=0755` |\n| `user` | User management | `user: name=asdbot groups=sudo shell=\u002Fbin\u002Fbash` |\n| `authorized_key` | SSH keys | `authorized_key: user=asdbot key=\"{{ ssh_key }}\"` |\n| `systemd` | Service management | `systemd: name=nginx state=started enabled=yes` |\n| `ufw` | Firewall (Ubuntu) | `ufw: rule=allow port=22 proto=tcp` |\n| `lineinfile` | Edit single line | `lineinfile: path=\u002Fetc\u002Fssh\u002Fsshd_config regexp='^PermitRootLogin' line='PermitRootLogin no'` |\n| `git` | Clone repos | `git: repo=https:\u002F\u002Fgithub.com\u002Fx\u002Fy.git dest=\u002Fopt\u002Fy` |\n| `npm` | npm packages | `npm: name=openclaw global=yes` |\n| `command` | Run command | `command: \u002Fopt\u002Fscript.sh` |\n| `shell` | Run shell command | `shell: cat \u002Fetc\u002Fpasswd \\| grep root` |\n\n## Best Practices\n\n### 1. Always Name Tasks\n```yaml\n# Good\n- name: Install nginx web server\n  apt:\n    name: nginx\n    state: present\n\n# Bad\n- apt: name=nginx\n```\n\n### 2. Use FQCN (Fully Qualified Collection Names)\n```yaml\n# Good\n- ansible.builtin.apt:\n    name: nginx\n\n# Acceptable but less clear\n- apt:\n    name: nginx\n```\n\n### 3. Explicit State\n```yaml\n# Good - explicit state\n- ansible.builtin.apt:\n    name: nginx\n    state: present\n\n# Bad - implicit state\n- ansible.builtin.apt:\n    name: nginx\n```\n\n### 4. Idempotency\nWrite tasks that can run multiple times safely:\n```yaml\n# Good - idempotent\n- name: Ensure config line exists\n  ansible.builtin.lineinfile:\n    path: \u002Fetc\u002Fssh\u002Fsshd_config\n    regexp: '^PasswordAuthentication'\n    line: 'PasswordAuthentication no'\n\n# Bad - not idempotent\n- name: Add config line\n  ansible.builtin.shell: echo \"PasswordAuthentication no\" >> \u002Fetc\u002Fssh\u002Fsshd_config\n```\n\n### 5. Use Handlers for Restarts\n```yaml\n# tasks\u002Fmain.yml\n- name: Update SSH config\n  ansible.builtin.template:\n    src: sshd_config.j2\n    dest: \u002Fetc\u002Fssh\u002Fsshd_config\n  notify: Restart SSH\n\n# handlers\u002Fmain.yml\n- name: Restart SSH\n  ansible.builtin.systemd:\n    name: sshd\n    state: restarted\n```\n\n### 6. Tags for Selective Runs\n```yaml\n- name: Security tasks\n  ansible.builtin.include_tasks: security.yml\n  tags: [security, hardening]\n\n- name: App deployment\n  ansible.builtin.include_tasks: deploy.yml\n  tags: [deploy, app]\n```\n\n## Troubleshooting\n\n### Connection Issues\n\n```bash\n# Test SSH connection manually\nssh -v user@host\n\n# Debug Ansible connection\nansible host -i inventory -m ping -vvv\n\n# Check inventory parsing\nansible-inventory -i inventory --list\n```\n\n### Common Errors\n\n**\"Permission denied\"**\n- Check SSH key permissions: `chmod 600 ~\u002F.ssh\u002Fid_*`\n- Verify user has sudo access\n- Add `become: yes` to playbook\n\n**\"Host key verification failed\"**\n- Add to ansible.cfg: `host_key_checking = False`\n- Or add host key: `ssh-keyscan -H host >> ~\u002F.ssh\u002Fknown_hosts`\n\n**\"Module not found\"**\n- Use FQCN: `ansible.builtin.apt` instead of `apt`\n- Install collection: `ansible-galaxy collection install community.general`\n\n### Debugging Playbooks\n\n```bash\n# Verbose output\nansible-playbook site.yml -v    # Basic\nansible-playbook site.yml -vv   # More\nansible-playbook site.yml -vvv  # Maximum\n\n# Step through tasks\nansible-playbook site.yml --step\n\n# Start at specific task\nansible-playbook site.yml --start-at-task=\"Install nginx\"\n\n# Check mode (dry run)\nansible-playbook site.yml --check --diff\n```\n\n## Integration with OpenClaw\n\n### From OpenClaw Agent\n\n```bash\n# Run playbook via exec tool\nexec command=\"ansible-playbook -i skills\u002Fansible\u002Finventory\u002Fhosts.yml skills\u002Fansible\u002Fplaybooks\u002Fopenclaw-vps.yml --limit eva\"\n\n# Ad-hoc command\nexec command=\"ansible eva -i skills\u002Fansible\u002Finventory\u002Fhosts.yml -m shell -a 'systemctl status openclaw'\"\n```\n\n### Storing Credentials\n\nUse OpenClaw's Vaultwarden integration:\n```bash\n# Get password from vault cache\nPASSWORD=$(.secrets\u002Fget-secret.sh \"VPS - Eva\")\n\n# Use in ansible (not recommended - use ansible-vault instead)\nansible-playbook site.yml -e \"ansible_ssh_pass=$PASSWORD\"\n```\n\nBetter: Store in Ansible Vault and use `--ask-vault-pass`.\n\n## References\n\n- `references\u002Fbest-practices.md` - Detailed best practices guide\n- `references\u002Fmodules-cheatsheet.md` - Common modules quick reference\n- `references\u002Ftroubleshooting.md` - Extended troubleshooting guide\n\n## External Resources\n\n- [Ansible Documentation](https:\u002F\u002Fdocs.ansible.com\u002F)\n- [Ansible Galaxy](https:\u002F\u002Fgalaxy.ansible.com\u002F) - Community roles\n- [geerlingguy roles](https:\u002F\u002Fgithub.com\u002Fgeerlingguy?tab=repositories&q=ansible-role) - High quality roles\n- [Ansible for DevOps](https:\u002F\u002Fwww.ansiblefordevops.com\u002F) - Book by Jeff Geerling\n",{"name":5,"metadata":24,"description":7},{"openclaw":25},{"install":26,"requires":32},[27],{"id":5,"bins":28,"kind":30,"label":31,"package":5},[5,29],"ansible-playbook","pip","Install Ansible (pip)",{"bins":33},[5,29],"main","f9d3fe7cf9ac8f1ea63a0d96e98e1f510a3814db","skills\u002Fbotond-rackhost\u002Fansible-skill",1,"https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills","https:\u002F\u002Fgithub.com\u002Fjavimosch","intrane.fr","Building robust, open-source infrastructure for the commons. AI-leveraged, self-hosted, built to last.","2026-06-07 03:34:58",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add javimosch\u002Fopen-claw-skills --skill ansible",{"tool":49,"command":50},"bunx","bunx skills add javimosch\u002Fopen-claw-skills --skill ansible",{"tool":52,"command":53},"pnpm","pnpm dlx skills add javimosch\u002Fopen-claw-skills --skill ansible","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fbotond-rackhost\u002Fansible-skill\u002FSKILL.md",true,[],[58,66,73,80,87,94],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":65},"01M778GGXG2VQ0YF31W2MKGMQZ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":65},"01M778G7BH8SBJ9FJ6C3G7CB1K","ceaser","Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp \u003Csubcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir\u002FUltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyra-v21\u002Fceaser\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":65},"01M778FYCJQZWFKKX5FYMK3S47","ceaser-send","Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp \u003Csubcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir\u002FUltraHonk zero-knowledge proofs.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyra-v21\u002Fceaser-send\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":65},"01M778FQQNSEYA3HJKZBPQ4M9Z","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":65},"01M778FGVZX7QA2TF9BFMM37FY","moldium","Post and manage content on the Moldium blog platform. Triggered by \"post to Moldium\", \"write a blog post\", \"publish an article\", etc.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyom45\u002Fmoldium\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":65},"01M778F88D8PQ9MQ0KNW2TJ8ZH","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http:\u002F\u002Fweakaccept.top:8000\u002F.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[]]