Ansible
NetActuate provides Ansible modules for provisioning and managing infrastructure. You can use Ansible playbooks to deploy virtual servers, configure BGP sessions, and manage your NetActuate resources alongside your application deployment workflows.
Prerequisites
- Ansible 2.10 or later
- Python 3.8 or later
- A NetActuate API key
Installation
Install the NetActuate Ansible collection:
ansible-galaxy collection install netactuate.cloud
Authentication
Set your API key as an environment variable:
export NETACTUATE_API_KEY="your-api-key-here"
Or pass it directly in your playbook:
- hosts: localhost
vars:
netactuate_api_key: "{{ lookup('env', 'NETACTUATE_API_KEY') }}"
Quick Start
Create a playbook to provision a virtual server:
---
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Create a virtual server
netactuate.cloud.server:
api_key: "{{ lookup('env', 'NETACTUATE_API_KEY') }}"
hostname: "web-01"
plan: "VR2048x2x40"
location: "ashburn"
image: "ubuntu-24.04"
ssh_keys:
- "my-key-id"
state: present
register: server
- name: Display server IP
debug:
msg: "Server IP: {{ server.ip_address }}"
Run the playbook:
ansible-playbook provision.yml
Available Modules
| Module | Description |
|---|---|
netactuate.cloud.server | Manage virtual server instances |
netactuate.cloud.ssh_key | Manage SSH keys |
netactuate.cloud.bgp_session | Manage BGP sessions |
netactuate.cloud.server_info | Retrieve server information |
netactuate.cloud.location_info | Retrieve available locations |
Playbook Examples
The following pages provide complete playbook examples for common use cases:
- Add-On Playbooks -- Additional provisioning playbooks
- NGINX Workers -- Deploy NGINX worker nodes
- PowerDNS Authoritative -- Deploy PowerDNS authoritative servers
- Varnish Frontend -- Deploy Varnish caching frontends
- BGP Worker Node -- Deploy BGP-enabled worker nodes
Need Help?
If you need assistance with Ansible automation, visit our support page.