Cairn IaC

Mindthe diff.Gareau diff.

Cairn IaC: the box and the firewall of one machine

Cairn IaC turns your OpenTofu and Ansible repository for Proxmox into one page per machine, and walks every change to its pull request.Cairn IaC fait de votre dépôt OpenTofu et Ansible pour Proxmox une page par machine, et mène chaque modification jusqu'à sa pull request.

Get it on GitHubLe récupérer sur GitHub

The pages it makesLes pages qu'il fait

The pages it makesLes pages qu'il fait

Try it liveL'essayer en vrai
Overview: the path of a change for one machine
Roles: every role with the machines that get it
Review: the diff of a new firewall rule and the commit message

The page, liveLa page, en vrai

The real output for the example in the repository: two guests on two Proxmox nodes. Click a machine, a role, a view.Le vrai rendu de l'exemple du dépôt : deux invités sur deux nœuds Proxmox. Cliquez une machine, un rôle, une vue.

ViewVue
Tofu machinesMachines Tofu2
Guest firewallsPare-feux invités1
Inventory hostsHôtes d'inventaire4
Playbooks · rolesPlaybooks · rôles1 · 2
Open it full screenL'ouvrir en plein écran

Many files, one pageDes fichiers, une page

It reads files only: no state, no credentials, no run. Machines are matched across Tofu, firewalls and the inventory by id and by name.Il ne lit que des fichiers : ni état, ni identifiants, rien n'est lancé. Les machines sont rapprochées entre Tofu, pare-feux et inventaire par id et par nom.

ReadLire

Every *.tf, the YAML inventory, each playbook and role.Chaque *.tf, l'inventaire YAML, chaque playbook et rôle.

MatchRelier

By vm_id and by name, case and _ / - ignored.Par vm_id et par nom, sans tenir compte de la casse ni de _ / -.

ShowMontrer

One self-contained page, Tofu on one line, Ansible on the other.Une page autonome, Tofu sur une ligne, Ansible sur l'autre.

Python and PyYAMLPython et PyYAML

The page needs nothing else. The server adds git and ssh, or runs from the published image.La page n'a besoin de rien d'autre. Le serveur ajoute git et ssh, ou tourne avec l'image publiée.

# Debian: apt install python3-yaml
pip install pyyaml
git clone https://github.com/JBelliriGenty/Cairn-IaC
cd Cairn-IaC
python3 cairn-iac.py -c example/cairn-iac.json -o example.html
# server mode: edit, diff, commit, pull request
docker run -d -p 8080:8080 \
  -v $PWD/server.json:/etc/cairn-iac/config.json:ro \
  -v cairn-iac:/var/lib/cairn-iac \
  ghcr.io/jbellirigenty/cairn-iac:1
  • never runs tofu or ansible
  • ne lance jamais tofu ni ansible
  • reads no state and no secrets
  • ne lit ni état ni secrets
  • no outside request
  • aucune requête extérieure

Opens the repository on GitHub: README, example, MIT licence.Ouvre le dépôt sur GitHub : README, exemple, licence MIT.

CloneCloner