Files
infra-phytron/CLAUDE.md
T
CubelaPetarandClaude Opus 4.8 75296ce58c Rename phy-z-srv-gpu01 to phy-srv-gpu01; fix share analysis scripts
- rename host/group/folder everywhere to match the server's actual
  hostname and physical label
- share-analysis.ps1: sanitize the output filename prefix — '-Paths "D:"'
  produced 'D:-file-types.csv' and Export-Csv failed with 'path format
  not supported', so no CSVs were written
- share-analysis.ps1: new -FolderDepth so folders can be aggregated at
  D:\Abteilungen\<Share> level, which matches the share layout
- list-shares.ps1: -WithSize walks local paths instead of UNC when run on
  the server itself (UNC was orders of magnitude slower and looked stuck)
  and prints progress every 50k files

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-03 14:47:07 +02:00

3.5 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Rules Set

  1. Ask, don't assume. If something is unclear, ask before writing a single line. Never make silent assumptions about intent, architecture, or requirements.
  2. Simplest solution first. Always implement the simplest thing that could work. Do not add abstractions or flexibility that weren't explicitly requested.
  3. Don't touch unrelated code. If a file or function is not directly part of the current task, do not modify it, even if you think it could be improved.
  4. Flag uncertainty explicitly. If you are not confident about an approach or technical detail, say so before proceeding. Confidence without certainty causes more damage than admitting a gap.

Repository Purpose

Infrastructure as Code and runbooks for Phytron's server infrastructure. Global configuration is done via Ansible; host-specific documentation, scripts, and files live under server/.

Structure

ansible/                    # Global settings & configuration for all servers
  hosts.ini                 # Inventory: all existing and planned servers with IPs.
                            # One group per host; group names use underscores
                            # (phy_z_srv_git), host aliases the real hostnames
                            # (phy-z-srv-git ansible_host=<IP>)
  group_vars/all.yml        # Defaults shared by all hosts (incl. ansible_user/port)
  group_vars/<group>.yml    # Per-host overrides ONLY — no copies of all.yml values
  group_vars/secrets.yml    # ansible-vault encrypted secrets — never commit plaintext
  run.yml                   # Main playbook
  playbooks/                # Utility playbooks (update.yml)
  roles/                    # Custom roles (nextcloud, nvidia_gpu)
  requirements.yml          # External Galaxy roles (geerlingguy.*, ...)
  justfile                  # Task runner: just run HOST, just reqs, just vault ACTION

server/<hostname>/          # Host-specific docs, scripts, files
  README.md                 # Server documentation, filled gradually
  manuals/                  # Runbooks (how-to), dated YYYYMMDD-<topic>.md
  notes/                    # Assessments, planning docs, working notes (dated)
  scripts/                  # Host-related helper scripts
  HW.md                     # Hardware specs (where relevant)

Servers

Hostname IP Status
phy-z-srv-jira 192.168.66.41 configured
phy-z-srv-cloud 192.168.66.66 configured (Nextcloud)
phy-z-srv-git 192.168.66.67 configured
phy-z-dmz-sftp01 192.168.99.68 configured
phy-srv-gpu01 192.168.66.69 in setup — base + GPU driver done

Conventions

  • Ansible commands run from ansible/, preferably via the justfile (e.g. just run <HOST>).
  • Secrets go into ansible/group_vars/secrets.yml, encrypted with ansible-vault. Never commit plaintext secrets.
  • SSH password authentication stays enabled for easy access (servers are not reachable from outside); exception: DMZ hosts like phy-z-dmz-sftp01 are key-only.
  • Dated documents (runbooks, assessments) use the YYYYMMDD-<topic>.md naming scheme.
  • New servers get: an entry in hosts.ini, a group_vars/<group>.yml (overrides only), and a server/<hostname>/ folder with a README.