https://github.com/gurram2001/devops_tools
This is Ansible role to automate the installation of Docker and essential DevOps tools like Docker Compose, kubectl, Helm, and Terraform.
https://github.com/gurram2001/devops_tools
ansible ansible-role ansible-roles automation helm infrastructure-as-code kubernetes terraform
Last synced: 3 months ago
JSON representation
This is Ansible role to automate the installation of Docker and essential DevOps tools like Docker Compose, kubectl, Helm, and Terraform.
- Host: GitHub
- URL: https://github.com/gurram2001/devops_tools
- Owner: Gurram2001
- Created: 2025-05-17T05:42:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-17T06:27:35.000Z (about 1 year ago)
- Last Synced: 2025-06-20T15:46:20.842Z (about 1 year ago)
- Topics: ansible, ansible-role, ansible-roles, automation, helm, infrastructure-as-code, kubernetes, terraform
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### π `roles/devops_tools/README.md`
# Ansible Role: DevOps Tools Setup
This Ansible role installs and configures essential tools required for a DevOps environment. It includes the installation of Docker, Docker Compose, Git, and other helpful command-line utilities. Optional tools like `kubectl`, `helm`, and `terraform` can also be installed based on variables.
---
## π¦ Features
- Installs Docker and enables the Docker service
- Installs Docker Compose (v2)
- Adds specified users to the Docker group
- Installs commonly used CLI tools: `git`, `curl`, `jq`, `unzip`, `python3-pip`
- Optional installation of:
- `kubectl` (Kubernetes CLI)
- `helm` (Helm CLI)
- `terraform` (HashiCorp IaC tool)
---
## π Role Structure
```text
devops_tools/
βββ defaults/
β βββ main.yml
βββ handlers/
β βββ main.yml
βββ tasks/
β βββ main.yml
βββ vars/
β βββ main.yml
βββ README.md
````
---
## π Requirements
* Ubuntu/Debian-based Linux systems
* `sudo` privileges on target hosts
---
## π§ Role Variables
You can override these variables in your playbook or inventory.
| Variable | Default | Description |
| ------------------- | ------------ | -------------------------------------- |
| `docker_users` | `['ubuntu']` | List of users to add to `docker` group |
| `install_kubectl` | `false` | Set to `true` to install `kubectl` |
| `install_terraform` | `false` | Set to `true` to install Terraform |
| `install_helm` | `false` | Set to `true` to install Helm |
---
## π Example Usage
### Inventory
**`inventory.ini`**
```ini
[dev]
your-ec2-ip-or-hostname ansible_user=ubuntu ansible_ssh_private_key_file=~/.ssh/id_rsa
```
### Playbook
**`site.yml`**
```yaml
- name: Setup DevOps Tools
hosts: dev
become: true
roles:
- role: devops_tools
vars:
docker_users:
- ubuntu
- ansible
install_kubectl: true
install_terraform: true
install_helm: false
```
---
## βΆοΈ Run It
```bash
ansible-playbook -i inventory.ini site.yml
```
---
## π Notes
* The role is optimized for Ubuntu/Debian-based hosts. You may need to adapt it for RHEL/CentOS.
* Docker Compose is installed manually as a binary (v2 format).
* Tools are installed directly from official sources (e.g., GitHub, HashiCorp).
---
## β
Best Practices
* Use `group_vars` or `host_vars` to manage environment-specific configs.
* Parameterize versions of tools if you want tighter control over reproducibility.
* Run `ansible-lint` on this role if youβre enforcing YAML or Ansible coding standards.
---
## π License
MIT License
---
## πββοΈ Author
Gurram Mani Karthik
Inspired by real-world DevOps onboarding needs.
```