Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML.
Play
Task 1
Task 2
playbook.yml
---
- name: Install and start nginx
hosts: webservers
become: true
vars:
app_port: 80
tasks:
- name: Install nginx
apt:
name: nginx
state: present
- name: Start nginx
service:
name: nginx
state: started
enabled: true
Examples
Install and start nginx
hosts webservers, become yes
task Install nginx (apt): name: nginx / state: present
task Start nginx (service): name: nginx / state: started- name: Install and start nginx
hosts: webservers
become: true
tasks:
- name: Install nginx
apt:
name: nginx
state: presentA play with sudo and two tasks using the apt and service modules.
About this tool
The Ansible Playbook Generator writes a playbook YAML from a form. Set the play name and hosts, toggle become for sudo, declare vars as KEY=VALUE lines, and add tasks — each with a name, a module, and YAML-style arguments. The output is a ready-to-run playbook — nothing is uploaded.
How to use
Set hosts and vars
Pick the host group and add variables; numeric and boolean values are left bare, strings are quoted.
Add tasks
Each task has a module (apt, service, copy, …) and indented YAML arguments.
Run the playbook
Save the YAML and run it with `ansible-playbook`.
Use cases
Server provisioning
Define the steps to configure a fresh server.
Common mistakes
Mistake:Indentation in arguments.
Fix:Keep argument lines aligned; YAML is indentation-sensitive and misaligned args fail to parse.
Frequently asked questions
Related guides
References & standards
Related tools
Reverse DNS (PTR) Lookup
Perform reverse DNS lookups for IPv4 and IPv6 addresses using DNS-over-HTTPS
MX Record Lookup
Inspect MX (Mail Exchanger) records, priority preferences, and email provider detection
TXT Record & SPF/DKIM Checker
Query TXT records and analyze SPF, DKIM, and DMARC email authentication security policies
NS Record Lookup
Inspect Name Server (NS) DNS records and authoritative DNS provider configurations
GitLab CI Generator
Generate a .gitlab-ci.yml from stages and jobs — images, scripts, artifacts, and branch rules
Jenkins Pipeline Builder
Build a declarative Jenkinsfile — agent, environment, stages with shell steps, and post actions