This project is an infrastructure automation solution using Ansible to set up and configure multiple systems. It provides a structured approach to system configuration, Docker deployment, and application management across different instances.
cloud1/
├── ansible.cfg # Ansible configuration file
├── config/ # Configuration role
├── copy/ # File copying role
├── core/ # Core functionality
├── docker/ # Docker installation and configuration role
├── group_vars/ # Group variables for Ansible
├── inventory.ini # Target hosts inventory
├── keys/ # SSH and other authentication keys
├── Makefile # Build and automation tasks
├── playbook.yaml # Main Ansible playbook
└── run/ # Runtime execution role
- Automated system configuration
- Docker installation and setup
- File deployment and management
- Configurable runtime execution
- Support for multiple target instances (AWS and custom instances)
- Ansible installed on the control node
- SSH access to target instances
- Proper network connectivity to target instances
- Required SSH keys in the
keys/
directory
- Ensure all prerequisites are met
- Configure your target instances in
inventory.ini
- Place necessary SSH keys in the
keys/
directory - Update group variables if needed in
group_vars/
ansible-playbook playbook.yaml -i inventory.ini
The playbook will execute the following roles in order:
config
: Basic system configurationdocker
: Docker installation and setupcopy
: File deploymentrun
: Runtime execution
Each role includes retry logic (3 attempts with 5-second delays) to ensure reliable execution.
- Handles basic system configuration
- Sets up necessary system parameters
- Configures base requirements
- Installs Docker
- Configures Docker settings
- Sets up Docker service
- Manages file deployments
- Copies necessary configurations
- Handles file permissions
- Executes runtime configurations
- Manages service startup
- Handles application deployment
sehmus_instances
: Custom instance configurationaws_instances
: AWS infrastructure management
To update the project configuration:
- Modify role-specific files in respective directories
- Update inventory.ini for new instances
- Adjust group variables as needed
- Run the playbook to apply changes
- Fork the repository
- Create a feature branch
- Submit a pull request