Quick Start
This guide walks you through running your first Parallax playbook.
Step 1: Create an Inventory
Create an inventory file that defines your target hosts. Save this as inventory.ini:
[webservers]
web1.example.com ansible_host=10.0.0.1
web2.example.com ansible_host=10.0.0.2
[webservers:vars]
ansible_user=deploy
Or use a comma-separated list for quick testing:
parallax play -i "localhost," playbook.yml
Step 2: Write a Playbook
Create a file called site.yml:
---
- name: Configure web servers
hosts: webservers
become: true
tasks:
- name: Install nginx
package:
name: nginx
state: present
- name: Start nginx service
service:
name: nginx
state: started
enabled: true
- name: Deploy index page
template:
src: templates/index.html.j2
dest: /var/www/html/index.html
notify:
- restart nginx
handlers:
- name: restart nginx
service:
name: nginx
state: restarted
Step 3: Run It
# Dry run first
parallax play -i inventory.ini --check site.yml
# Execute for real
parallax play -i inventory.ini site.yml
You’ll see familiar Ansible-style output:
PLAY [Configure web servers] **************************************************
TASK [Gathering Facts] ********************************************************
ok: [web1.example.com]
ok: [web2.example.com]
TASK [Install nginx] **********************************************************
changed: [web1.example.com]
changed: [web2.example.com]
TASK [Start nginx service] ****************************************************
changed: [web1.example.com]
changed: [web2.example.com]
PLAY RECAP ********************************************************************
web1.example.com : ok=3 changed=2 unreachable=0 failed=0
web2.example.com : ok=3 changed=2 unreachable=0 failed=0
Next Steps
- Read the User Guide for complete usage details
- Explore 134 built-in modules
- Migrating from Ansible? See the Migration Guide
- Enable performance features like connection pooling and module caching