An open API service indexing awesome lists of open source software.

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.

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.

```