Ansible Playbook Scaffolder
Fill in hosts, packages, services, users and firewall ports and get a ready-to-edit Ansible playbook with a restart handler.
Use the tool
Why this tool exists
A first server setup playbook almost always does the same things: refresh the package cache, install a few packages, create a deploy user, open ports and start a service. Writing the YAML by hand means checking module names and indentation each time, and small mistakes only show up when the play runs.
This tool writes that baseline using the fully qualified module names (ansible.builtin.package, ansible.builtin.user, community.general.ufw). It assumes Debian or Ubuntu style tooling for the apt cache and ufw tasks, so adjust it for other systems. The text is built in your browser and never leaves it.
How to use it
- Enter the play name, the target hosts group and whether to use become.
- List packages, services, users and TCP ports, separated by commas.
- Copy the YAML into a playbook file and run it with ansible-playbook --check first.
Frequently asked questions
Does it work on Red Hat style systems?
The package, user and service tasks are generic, but the apt cache update and ufw firewall tasks are Debian-oriented. Untick the cache option and replace ufw with firewalld or similar if needed.
What is the handler for?
A handler named Restart followed by your first service is added at the end, so other tasks can notify it. The generated tasks do not notify it yet, so link it where you change config.
Do I need the community.general collection?
Only if you list firewall ports, because the ufw module lives there. Install it with ansible-galaxy collection install community.general.
Is a bad port number caught?
Yes. A port that is not a whole number up to 65535 stops the tool with an error before any YAML is produced.