Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/solidrhino/infra

Infrastructure as Code (IaC) for managing Raspberry Pi servers using Ansible. Automates the setup and maintenance of development tools, system configurations, and services.
https://github.com/solidrhino/infra

ansible automation configuration-management devops docker infrastructure-as-code linux raspberry-pi server-management

Last synced: 15 days ago
JSON representation

Infrastructure as Code (IaC) for managing Raspberry Pi servers using Ansible. Automates the setup and maintenance of development tools, system configurations, and services.

Awesome Lists containing this project

README

        

# ๐Ÿš€ RPi Infrastructure

> ๐Ÿค– Infrastructure as Code (IaC) for managing Raspberry Pi servers using Ansible. Automates the setup and maintenance of development tools, system configurations, and services.

## โœจ Features

### ๐Ÿ”ง System Configuration
- ๐Ÿ“ฆ Package management and system updates
- ๐Ÿ”’ Security configurations
- ๐ŸŒก๏ธ Performance optimizations with Argon cooling
- โšก Overclocking support (when cooling is properly configured)

### ๐Ÿ‘จโ€๐Ÿ’ป Development Environment
- ๐Ÿฆ€ Rust and Cargo setup
- ๐Ÿ› ๏ธ Modern CLI tools installation and configuration
- ๐Ÿ‹ Docker environment setup
- ๐Ÿ“š Common development packages

### ๐ŸŸ Shell Environment
- ๐Ÿ  Fish shell with modern configuration
- โญ Starship prompt for enhanced CLI experience
- ๐Ÿ”— Useful aliases and functions
- ๐Ÿงฐ Improved CLI tools:
- ๐Ÿ“Š Bottom (btm) - Modern system monitor
- ๐Ÿ“‚ Eza - Enhanced file listing
- ๐Ÿ“ Bat - Enhanced file viewer
- ๐Ÿ—บ๏ธ Zoxide - Smart directory navigation

## ๐Ÿ“‹ Prerequisites

- ๐ŸŽฎ Ansible 2.9 or higher
- ๐Ÿฅง Raspberry Pi running Ubuntu/Debian
- ๐Ÿ”‘ SSH access configured
- โšก Just command runner (optional, but recommended)

## ๐Ÿ“ Directory Structure

```
infra/
โ”œโ”€โ”€ playbooks/
โ”‚ โ”œโ”€โ”€ tasks/
โ”‚ โ”‚ โ”œโ”€โ”€ system.yaml # ๐Ÿ”ง System configuration tasks
โ”‚ โ”‚ โ”œโ”€โ”€ development.yaml # ๐Ÿ‘จโ€๐Ÿ’ป Development tools tasks
โ”‚ โ”‚ โ”œโ”€โ”€ shell.yaml # ๐ŸŸ Shell configuration tasks
โ”‚ โ”‚ โ”œโ”€โ”€ terminal.yaml # ๐Ÿ’ป Terminal configuration tasks
โ”‚ โ”‚ โ””โ”€โ”€ overclocking.yaml # โšก Overclocking configuration
โ”‚ โ”œโ”€โ”€ run.yaml # ๐Ÿš€ Main playbook
โ”‚ โ”œโ”€โ”€ update.yaml # ๐Ÿ”„ Update playbook
โ”‚ โ””โ”€โ”€ reboot.yaml # ๐Ÿ”Œ Reboot playbook
โ”œโ”€โ”€ roles/ # ๐ŸŽญ Ansible roles
โ”œโ”€โ”€ group_vars/ # โš™๏ธ Variable files
โ””โ”€โ”€ justfile # ๐Ÿ“œ Just command definitions
```

## ๐Ÿš€ Quick Start

1. Clone the repository:
```bash
git clone https://github.com/SolidRhino/infra.git
cd infra
```

2. Initialize the environment:
```bash
just init
```

3. Run the playbook:
```bash
just run server
```

## ๐ŸŽฎ Available Commands

### ๐ŸŽฏ Main Operations
- `just run server` - ๐Ÿš€ Run main configuration playbook
- `just update server` - ๐Ÿ”„ Update system and tools
- `just quick-update server` - โšก Quick system update only
- `just dev-update server` - ๐Ÿ› ๏ธ Update development tools
- `just reboot server` - ๐Ÿ”Œ Reboot the server

### ๐Ÿ‘จโ€๐Ÿ’ป Development Operations
- `just lint` - ๐Ÿ” Run ansible-lint
- `just format` - โœจ Format and lint yaml files
- `just init` - ๐ŸŽฎ Initialize development environment

### ๐Ÿ”ง Maintenance
- `just clean` - ๐Ÿงน Clean up temporary files
- `just facts server` - ๐Ÿ“Š Show Ansible facts for host
- `just ping server` - ๐Ÿ”” Test connectivity

## ๐Ÿ”„ Update Process

The repository includes separate playbooks for different update scenarios:

- ๐Ÿ“ฆ Full system update:
```bash
just update server
```

- โšก Quick system update (OS packages only):
```bash
just quick-update server
```

- ๐Ÿ› ๏ธ Development tools update:
```bash
just dev-update server
```

## โš™๏ธ Customization

1. โœ๏ธ Edit `vars/` files to customize configurations
2. ๐Ÿ”ง Modify tasks in `playbooks/tasks/` for specific needs
3. โž• Add new roles to `roles/` directory
4. ๐Ÿ“ Update `justfile` for new commands

## ๐Ÿค Contributing

1. ๐Ÿด Fork the repository
2. ๐ŸŒฟ Create a feature branch
3. ๐Ÿ’พ Commit your changes
4. ๐Ÿš€ Push to the branch
5. ๐Ÿ“ฌ Create a Pull Request

## ๐Ÿ™ Acknowledgments

- ๐ŸŽฎ [Ansible](https://www.ansible.com/)
- ๐ŸŸ [Fish Shell](https://fishshell.com/)
- โญ [Starship](https://starship.rs/)
- ๐Ÿ“Š [Bottom](https://github.com/ClementTsang/bottom)
- ๐Ÿ“‚ [Eza](https://github.com/eza-community/eza)
- ๐Ÿ“ [Bat](https://github.com/sharkdp/bat)
- ๐Ÿ—บ๏ธ [Zoxide](https://github.com/ajeetdsouza/zoxide)

---


๐ŸŒŸ Star this repository if you find it helpful!