Skip to content

xgueret/local-compute

Repository files navigation

Automated Laptop Setup and Configuration with Ansible

Description Stars Last Commit Status

This project uses Ansible to automate the installation and configuration of a laptop running Debian or Ubuntu. It includes essential software installation, system configuration, and the management of development and containerization tools.

Project Structure

  • ansible.cfg: Global Ansible configuration
  • inventory.yml: Defines hosts and groups for Ansible
  • playbook.yml: Main playbook orchestrating the role execution
  • roles/: Contains various Ansible roles
    • local_laptop/: Laptop installation and configuration
    • docker/: Docker and Docker Compose installation
    • git/: Git configuration
    • kubectl/: kubectl installation
    • devtools/: Development tools installation (e.g., Postman)
    • asdf/: asdf version manager setup
    • hashicorp_software/: Terraform and Vagrant installation
    • startship/: Starship installation
.
├── ansible.cfg
├── check_ansible_vault.sh
├── group_vars
│   └── all
├── img
│   └── local_laptop.png
├── local_laptop.sh
├── playbook.yml
├── pyvenv.cfg
├── README.md
├── remove_asdf_setup.yml
├── remove_packages.yml
├── requirement.txt
├── revert_kubernetes_setup.yml
├── roles
│   ├── asdf
│   ├── devtools
│   ├── docker
│   ├── git
│   ├── hashicorp_software
│   ├── homebrew
│   ├── kubectl
│   ├── local_laptop
│   └── startship
├── terraform
│   ├── main.tf
│   ├── terraform.tfstate
│   └── variables.tf
└── venv

📚 Prerequisites

  • Debian-based system (Debian 12, Ubuntu...)
  • Python 3.8 or higher
  • Ansible installed on the local machine

🚀 Installation

1. Clone the Repository

git clone <REPO_URL>
cd <REPO_NAME>

2. Install Dependencies

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirement.txt

3. Configure Ansible Vault

If files are encrypted with ansible-vault, ensure you have the password file:

export ANSIBLE_VAULT_PASSWORD_FILE=~/Workspace/.vault/.vault_password

4. Run the Playbook

ansible-playbook playbook.yml

Or with a specific tag:

ansible-playbook playbook.yml --tags install

🏷️Available Tags

  • install: Base installation
  • update: Package updates
  • configure: System configuration
  • remove_packages: Uninstall specific software
  • asdf: Manage plugins with asdf
  • kubernetes: Setup kubectl
  • docker: Install and configure Docker

🕵️‍♀️Security

The project uses pre-commit to ensure files containing secrets are properly encrypted with ansible-vault.

pre-commit install

👥 Contributors

  • Author: Xavier GUERET GitHub followers Twitter Follow LinkedIn

👥 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Managed by Terraform: This repository contains Ansible playbooks for setting up a local compute environment. The playbooks automate the installation and configuration of various tools and packages on your local machine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors