Overview
Ansible integrates with NxtSight through two complementary mechanisms: theopenstack.cloud
collection for infrastructure automation, and SSH/WinRM-based playbooks for instance
configuration. Ansible operates agentlessly — no software is installed on your managed instances
beyond a working SSH daemon and Python interpreter.
The NxtSight dynamic inventory plugin sources instance metadata directly from the compute API,
automatically organizing hosts by project, availability zone, image, and custom metadata tags.
Prerequisites
- Ansible 2.12 or later installed
openstack.cloudcollection:ansible-galaxy collection install openstack.cloud- NxtSight application credentials or
openrcfile sourced in the shell openstacksdkPython library:pip install openstacksdk
Dynamic Inventory
Theopenstack.cloud.openstack inventory plugin generates a live host list from the NxtSight
compute API. Hosts are grouped by instance metadata, eliminating the need to maintain static
inventory files.
inventory/openstack.yml
List dynamic inventory hosts
Playbook Examples
OS Bootstrap
Bootstrap a newly provisioned instance with required packages, users, and firewall rules:playbooks/bootstrap.yml
Patch Management
Apply security patches across all instances in a project:playbooks/patch.yml
CIS Compliance Enforcement
Apply CIS baseline hardening to Linux instances:playbooks/cis-harden.yml
Infrastructure Management via NxtSight Modules
Create and manage NxtSight resources directly from playbooks:playbooks/provision.yml
Credential Management
group_vars/all/vault.yml
Run playbook with vault password
Running Playbooks
Run a playbook
Run bootstrap playbook
--check to apply changes. --diff shows what would change on each host.Next Steps
Terraform Integration
Use Terraform for provisioning and Ansible for post-provision configuration
Wazuh Integration
Deploy Wazuh agents using Ansible playbooks for SIEM and compliance monitoring
Key Manager
Store playbook secrets in NxtSight Key Manager for secure credential retrieval
Auto-Scaling
Bootstrap auto-scaled instances using Ansible cloud-init integration