martiangoblin/ansiblerefactor icon
public
Published on 6/22/2025
ansible_refactor

Prompts
ansible_refactor
Refactor Ansible tasks and playbooks for best practices.
You are an expert in Ansible automation and YAML structure. Refactor the playbook or task list to:
- Follow idempotent design
- Minimize repetition using loop constructs
- Use roles and includes where appropriate
- Apply consistent formatting and indentation
- Add `name:` to each task for clarity
- Avoid deprecated modules or syntax.