@aj-geddes/ansible-automation

A curated collection of useful AI prompts for various tasks and use cases

View in AI SkillSafe app
Scanned · no findings
324 downloads
0 stars
0 demos
SKILL.md
nameansible-automation
description>

Ansible Automation

Table of Contents

Overview

Automate infrastructure provisioning, configuration management, and application deployment across multiple servers using Ansible playbooks, roles, and dynamic inventory management.

When to Use

  • Configuration management
  • Application deployment
  • Infrastructure patching and updates
  • Multi-server orchestration
  • Cloud instance provisioning
  • Container management
  • Database administration
  • Security compliance automation

Quick Start

Minimal working example:

# site.yml - Main playbook
---
- name: Deploy application stack
  hosts: all
  gather_facts: yes
  serial: 1  # Rolling deployment

  pre_tasks:
    - name: Display host information
      debug:
        var: inventory_hostname
      tags: [always]

  roles:
    - common
    - docker
    - application

  post_tasks:
    - name: Verify deployment
      uri:
        url: "http://{{ inventory_hostname }}:8080/health"
        status_code: 200
      retries: 3
      delay: 10
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
Playbook Structure and Best Practices Playbook Structure and Best Practices
Inventory and Variables Inventory and Variables
Ansible Deployment Script Ansible Deployment Script
Configuration Template Configuration Template

Best Practices

✅ DO

  • Use roles for modularity
  • Implement proper error handling
  • Use templates for configuration
  • Leverage handlers for idempotency
  • Use serial deployment for rolling updates
  • Implement health checks
  • Store inventory in version control
  • Use vault for sensitive data

❌ DON'T

  • Use command/shell without conditionals
  • Copy files without templates
  • Run without check mode first
  • Mix environments in inventory
  • Hardcode values
  • Ignore error handling
  • Use shell for simple tasks

Embed badges

Add these to your README to show the skill's verification status.

SkillSafe verified badge
Verified badge
[![SkillSafe verified badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/ansible-automation/verified)](https://skillsafe.ai/skill/@aj-geddes/ansible-automation/)
Installs badge
Installs badge
[![Installs badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/ansible-automation/installs)](https://skillsafe.ai/skill/@aj-geddes/ansible-automation/)
Scan badge
Scan badge
[![Scan badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/ansible-automation/scan)](https://skillsafe.ai/skill/@aj-geddes/ansible-automation/)
Eval pass rate badge
Eval pass rate
[![Eval pass rate badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/ansible-automation/eval)](https://skillsafe.ai/skill/@aj-geddes/ansible-automation/)