jeremylongshore/tons-of-skills-marketplace / plugins/devops/ansible-playbook-creator/skills/creating-ansible-playbooks
creating-ansible-playbooks
VerifiedExecute use when you need to work with Ansible automation. This skill provides Ansible playbook creation with comprehensive guidance and automation. Trigger with phrases like "create Ansible playbook", "automate with Ansible", or "configure with Ansible".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.1 KB |
| assets/README.md | markdown | 501 B |
| assets/playbook_template.yml | config | 2.3 KB |
| assets/validation_rules.yml | config | 3.7 KB |
| references/README.md | markdown | 67 B |
| scripts/README.md | markdown | 436 B |
| scripts/secure_playbook.pyexecutable | script | 10.7 KB |
| scripts/test_playbook.shexecutable | script | 8.7 KB |
| scripts/validate_playbook.pyexecutable | script | 10.7 KB |
assets/playbook_template.yml
View on GitHub---
# Ansible Playbook Template
# This template provides a starting point for creating Ansible playbooks.
# It includes common sections and best practice configurations.
- name: "example-value - Playbook Description"
hosts: all # Target hosts or groups (e.g., webservers, dbservers)
become: true # Enable privilege escalation (sudo)
become_user: root # Specify the user to become (optional, defaults to root)
gather_facts: true # Gather facts about the target hosts
# Define variables that can be used throughout the playbook
vars:
# Example variables
app_name: "YOUR_APP_NAME"
app_version: "1.0.0"
install_dir: "/opt/{{ app_name }}"
# Add more variables as needed
# Pre-tasks: Tasks that run before any roles are applied
pre_tasks:
- name: "Update apt cache (Debian/Ubuntu)"
apt:
update_cache: yes
when: ansible_os_family == "Debian"
- name: "Update yum cache (RedHat/CentOS)"
yum:
update_cache: yes
when: ansible_os_family == "RedHat"
# Roles: Group of tasks to perform a specific function
roles:
- role: common # Example role for common configurations
# vars: # Role-specific variables (optional)
# some_var: "YOUR_VALUE_HERE"
# Add more roles as needed (e.g., webserver, database)
# - role: webserver
# Tasks: Individual steps to be executed
tasks:
- name: "Create installation directory"
file:
path: "{{ install_dir }}"
state: directory
owner: root
group: root
mode: "0755"
- name: "Copy application files"
copy:
src: "files/{{ app_name }}" # Path to application files on the control node
dest: "{{ install_dir }}"
owner: root
group: root
mode: "0644"
# Add more tasks as needed
# Post-tasks: Tasks that run after all roles and tasks have been applied
post_tasks:
- name: "Restart application service"
service:
name: "{{ app_name }}"
state: restarted
ignore_errors: true # Allows the playbook to continue even if the service restart fails
# Handlers: Tasks that are triggered by other tasks
handlers:
- name: "Restart web server"
service:
name: apache2
state: restarted
listen: "Restart web server" # Triggered by tasks that notify "Restart web server"Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |