our infrastructure using Ansible
Go to file
Kiara Grouwstra 97d53a657a documenten.bij1.org: add auth 2024-02-05 14:02:40 +01:00
.git-crypt Add 1 git-crypt collaborator 2023-10-29 14:36:38 +01:00
ansible documenten.bij1.org: add auth 2024-02-05 14:02:40 +01:00
.debops.cfg check-disk-space, closes #16 (#14) 2023-04-16 22:22:52 +00:00
.gitattributes test configuration 2022-08-22 19:11:11 +02:00
.gitignore test configuration 2022-08-22 19:11:11 +02:00
README.md document tested debian version 2023-12-16 20:23:16 +01:00
poetry.lock switch pip out to poetry for reproducibility 2023-07-16 15:32:01 +02:00
pyproject.toml switch pip out to poetry for reproducibility 2023-07-16 15:32:01 +02:00

README.md

BIJ1 ansible infrastructure

usage

Prerequisites

Install packages

poetry install

Secrets

To unlock secrets when you want to use this repo:

git crypt unlock

To lock them again after you finish:

git crypt lock

Bootstapping servers

Add any hosts to bootstap to the ansible/inventory/hosts file.

Then, to bootstrap the server $HOST_NAME run:

poetry run debops run bootstrap -l $HOST_NAME -e 'ansible_user=root netbase__hostname_config_enabled=false'
poetry run debops run common -l $HOST_NAME -e 'netbase__hostname_config_enabled=false'

After bootstrapping, you can run:

poetry run debops run common -l $HOST_NAME
poetry run debops run net -l $HOST_NAME
poetry run debops run site -l $HOST_NAME

If you'd like to rerun a single service, e.g. python for a log mention of debops.debops.python, run:

poetry run debops run service/$SERVICE -l $HOST_NAME

To get the node on the internal network, on the node in question run:

sudo rm -rf /etc/network/interfaces.d/old-interfaces
sudo cp /etc/network/interfaces.config.d/* /etc/network/interfaces.d/
sudo reboot

scope

Ansible - debops wordt nu gebruikt voor het regelen van o.a.:

  • message of the day (motd) die je in de terminal ziet bij het inloggen
  • server root wachtwoorden
  • firewall gaten
  • package updates

nog niet de gehele setups zijn reproducible. wat ook nog handmatig kan:

  • packages installeren
  • user accounts
  • sudo rechten
  • ssh keys