Skip to content

Latest commit

 

History

History
117 lines (98 loc) · 3.35 KB

README.md

File metadata and controls

117 lines (98 loc) · 3.35 KB

AGPL-3.0 License


catboy.house

Infrastructure for catboy.house.


Table of Contents
  1. About this Project
  2. Setup
  3. Usage
  4. Code conventions
  5. Copying

About this Project

catboy.house is a server that I used to share with someone else, hosting various services and projects.

I took over the server and am now in the process of migrating the existing services to be defined by Ansible.

Later on, I'm planning to add more public services for everyone to use.

Setup

Instructions for setting up playbook execution and contribution. Most likely, you won't need this.

Prerequisites

  • Python

Install Ansible and requirements

python -m pip install ansible
ansible-galaxy install -r requirements.yml

Make the host accessible

  • Add the host catboy-house to your ssh config
  • Have your public ssh key added by someone with access.

Vault password

Get the .vault_password file from someone and put it in the project root.

Become password

(become is Ansible's sudo)
Encrypt your server linux account's password and store it in host_vars/catboy_house/become.yml like this:

ansible-vault encrypt_string '<password>' --name ansible_become_pass > host_vars/catboy_house/become.yml

Usage

Running all Playbooks

./run.sh

Running tasks with specific tags

./run.sh --tags <tags> 

Running single Playbooks

ansible-playbook -i inventory.yml <playbook>

Linting

ansible-lint

Encrypting variables

ansible-vault encrypt_string <string> --name <var-name>

Code conventions

Verbs

Tasks are be named with what they do, in third-person singular, e.g. "🫖 Makes a tea".

Task prefixes

Task names are prefixed with specific emojis to make the output and nature of the task more scannable.

  • 🚀 are application/container launches.
  • 📂 are folder creations.
  • ⬆️ for file/template copying.
  • 📦 are package installations.
  • 👤 are user and group creations.
  • 💾 are fact sets.
  • ✅ are checks.
  • ⛔ are fail states.

Copying

You may re-use files and roles from this repository for you own projects as long as you comply to the terms of the GNU Affero General Public License version 3.0.