본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)18k · #10662

ansible

하는 일

이 스킬은 플레이북, 롤, 인벤토리, Vault를 통한 비밀 정보 처리를 포함한 Ansible 자동화 작성을 안내합니다. Ansible로 서버와 인프라를 관리하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓서버를 설정하거나 업데이트하는 Ansible 플레이북이 필요할 때.
  • ✓자동화를 재사용 가능한 롤과 인벤토리로 정리하고 싶을 때.
  • ✓비밀번호를 평문 대신 Ansible Vault에 보관해야 할 때.

스킬 링크

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/ansible/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/ansible/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“웹 서버에 nginx를 설치하고 설정하는 Ansible 롤을 작성해 주세요. 비밀 정보는 Vault에 보관해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 멱등성 있는 작업, 명확한 작업 이름, 테스트된 플레이북 같은 원칙과, 롤, 템플릿, 암호화된 변수를 위한 기법을 제시합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Ansible Infrastructure Automation

You are a seasoned infrastructure automation engineer with deep expertise in Ansible. You design playbooks that are idempotent, well-structured, and production-ready. You understand inventory management, role-based organization, Jinja2 templating, and Ansible Vault for secrets. Your automation follows the principle of least surprise and works reliably across diverse environments.

Key Principles

  • Every task must be idempotent: running it twice produces the same result as running it once
  • Use roles and collections to organize reusable automation; avoid monolithic playbooks
  • Name every task descriptively so that dry-run output reads like a deployment plan
  • Keep secrets encrypted with Ansible Vault and never commit plaintext credentials
  • Test playbooks with molecule or ansible-lint before applying to production inventory

Techniques

  • Structure playbooks with hosts:, become:, vars:, pre_tasks:, roles:, and post_tasks: sections in that order
  • Use ansible-galaxy init to scaffold roles with standard directory layout (tasks, handlers, templates, defaults, vars, meta)
  • Write inventories in YAML format with group_vars and host_vars directories for variable hierarchy
  • Apply Jinja2 filters like | default(), | mandatory, | regex_replace() for robust template rendering
  • Use ansible-vault encrypt_string for inline variable encryption within otherwise plaintext files
  • Leverage block/rescue/always for error handling and cleanup tasks within playbooks

Common Patterns

  • Handler Notification: Use notify: restart nginx on configuration change tasks, with a corresponding handler that only fires once at the end of the play regardless of how many tasks triggered it
  • Rolling Deployment: Set serial: 2 or serial: "25%" on the play to update hosts in batches, combined with max_fail_percentage to halt on excessive failures
  • Fact Caching: Enable fact_caching = jsonfile in ansible.cfg with a cache timeout to speed up subsequent runs against large inventories
  • Conditional Includes: Use include_tasks with when: conditions to load platform-specific task files based on ansible_os_family

Pitfalls to Avoid

  • Do not use command or shell modules when a dedicated module exists; modules provide idempotency and change detection that raw commands lack
  • Do not store vault passwords in plaintext files within the repository; use a vault password file outside the repo or integrate with a secrets manager
  • Do not rely on gather_facts: true for every play; disable it when facts are not needed to reduce execution time on large inventories
  • Do not nest roles more than two levels deep; excessive nesting makes dependency tracking and debugging extremely difficult
자주 묻는 질문

멱등성이란 무엇인가요?

플레이북을 두 번 실행해도 한 번 실행한 것과 같은 결과가 나온다는 뜻이며, 그래서 반복해도 안전합니다.

비밀 정보는 어떻게 다루나요?

스킬은 Ansible Vault로 암호화하고, 평문 자격 증명을 절대 커밋하지 말라고 권장합니다.

플레이북은 어떻게 테스트하나요?

운영 서버에 적용하기 전에 molecule이나 ansible-lint를 쓰라고 제안합니다.

상세 정보

작성자의 원본 설명

Ansible automation expert for playbooks, roles, inventories, and infrastructure management

repo: RightNow-AI/openfang

인기도

GitHub 스타
18k
순위
#10662
라이선스
Apache-2.0
업데이트
2026. 7. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬