Ansible

Automated provisioning and configuration of Ansible controllers and workers.

Commands: dob ansible config, dob ansible attach-worker

This feature introduces automated provisioning and configuration of Ansible controllers and workers, including both manager and worker nodes. The setup involves creating EC2 instances, configuring Ansible, and managing inventory files.

Key Highlights:

  1. Ansible Commands Group
    • Command Group: ansible
    • Description: Introduces a command group for managing and configuring Ansible controllers and workers in a DevOps environment using YAML-based configuration files.
    • Supported Commands:
      • Setup Ansible Controller
        • Command: dob ansible config --file-path <path>
        • Description: Provisions a new Ansible controller instance on AWS, configures SSH access, installs Ansible, and prepares the ansible.cfg and inventory file. Supports custom configuration via YAML.
      • Attach New Workers
        • Command: dob ansible attach-worker --file-path <path>
        • Description: Attaches new worker nodes to an existing Ansible controller. Automatically provisions new instances, distributes SSH keys, configures inventory, and performs a connectivity check using the ansible ping module.

Key Features:

Example YAML Configuration:


controller:
  name: ansible-controller
  instance_type: t2.medium
  key_name: my-ssh-key
  security_group: my-security-group
workers:
  name: ansible-worker
  instance_type: t2.small
  key_name: my-ssh-key
  security_group: my-security-group
  count: 3
      

Example Usage:


dob ansible config --file-path /path/to/config.yaml
dob ansible attach-worker --file-path /path/to/new-workers-config.yaml