Deploy Your First Configuration
Write an Ansible playbook in the ops0 editor, get it approved, and deploy it to a server — with full output tracking and rollback capability.
Scenario
You need to configure a server — install nginx, set up a service, or apply a system setting — consistently and repeatably. You want to:
- Write the Ansible playbook in ops0
- Run a dry run to see what would change
- Deploy to one or more servers
- Have a full record of what was applied
Prerequisites
Step 1: Create a Configuration Project
Install nginxStep 2: Write the Playbook
The configuration editor opens with a Monaco editor (YAML syntax, full highlighting and validation).
Paste or type your playbook:
---
- name: Install and configure nginx
hosts: all
become: yes
vars:
nginx_port: "{{ port | default(80) }}"
server_name: "{{ server_name | default('localhost') }}"
tasks:
- name: Update apt cache
apt:
update_cache: yes
cache_valid_time: 3600
when: ansible_os_family == "Debian"
- name: Install nginx
package:
name: nginx
state: present
- name: Start and enable nginx
service:
name: nginx
state: started
enabled: yes
- name: Check nginx is responding
uri:
url: "http://localhost:{{ nginx_port }}"
status_code: 200
register: nginx_check
ignore_errors: yes
- name: Show nginx status
debug:
msg: "nginx is {{ 'running' if nginx_check.status == 200 else 'not responding' }}"
Step 3: Define Variables (Optional)
Click the Variables panel on the right side of the editor to set default values:
| Variable | Default | Description |
|---|---|---|
port | 80 | Port nginx listens on |
server_name | localhost | Server name for nginx config |
Variables can be overridden at deploy time without editing the playbook.
Step 4: Get Approval
If your organization requires approval before configuration deployments:
- Click Submit for Approval
- An admin reviews the playbook and either approves or rejects it
- Rejected playbooks return with comments for revision
- Once approved, the configuration is ready to deploy
If approval is not required in your org, skip to Step 5.
Step 5: Run a Dry Run
Before deploying, run a dry run to see what would change without making any actual changes.
The dry run output shows each task and whether it would make a change:
TASK [Update apt cache] ───────────────────────── ok
TASK [Install nginx] ───────────────────────── changed ← would install
TASK [Start nginx] ───────────────────────── changed ← would start
TASK [Check nginx] ───────────────────────── skipped (dry run)
Dry run complete. 2 tasks would make changes.
Step 6: Deploy
Once you're satisfied with the dry run results:
port to 8080)The deployment output streams in real time:
PLAY [Install and configure nginx] ─────────────────────
TASK [Gathering Facts] ──────────────────────────── ok
TASK [Update apt cache] ─────────────────────────── ok
TASK [Install nginx] ────────────────────────────── changed
TASK [Start and enable nginx] ───────────────────── changed
TASK [Check nginx is responding] ────────────────── ok
TASK [Show nginx status] ────────────────────────── ok
msg: nginx is running
PLAY RECAP ──────────────────────────────────────────────
web-server-01: ok=6 changed=2 failed=0 skipped=0
Deployment complete.
Verification
After the deploy:
- The deployment record shows Succeeded with a summary:
ok=6 changed=2 failed=0 - Open Hive AI → Chat for the same server and ask: "Is nginx running?"
- You should see nginx active and listening on port 80
Deployment History
Every deployment is recorded with:
- Timestamp and who triggered it
- Variables used
- Full play output
- Summary (ok/changed/failed counts)
Click History on the configuration project to see all past deployments and their outputs.
Next Steps
Troubleshooting
systemctl status hive-agent.become: yes for tasks that need elevated privileges. The Hive agent must be running as a user with sudo access, or as root.