Compare commits

...

2 Commits

Author SHA1 Message Date
ed9ef924d3
note recutils example command 2025-03-21 01:51:31 +01:00
e0be97277a
fix container and host names 2025-03-20 23:38:11 +01:00
2 changed files with 63 additions and 30 deletions

View File

@ -15,3 +15,34 @@ These setup files provide the text-only configurations for DMZ.
- Any maintenance scripts.
- Configurations should reside in shadow-directories, e.g. a backup `soft-serve`'s `config.yaml` should reside in this repo under `splint.rs/soft-serve/etc/soft/config.yaml`.
# Network Database
I have a half-baked plan to finally make use of plain-text databases, and it's already half-working.
Try these commands:
Ask what types of _rec_ords it contains:
```sh
recinf network.rec
```
```sh
recsel network.rec --type router
recsel network.rec --include-descriptors --type lxc
recsel network.rec -d -t lxc
recsel network.rec -d -t lxc --expression
recsel network.rec -t lxc --expression "name ~ 'nginx'"
recsel network.rec -t lxc --expression "name = 'nginx12'"
```
If you can select something, you can also set its fields with `recset`.
Use `-f` to set the field, and `-a` to add, or `-s` to set.
```sh
recset network.rec -t lxc --expression "name = 'nginx12'" -f proxies --add soft-serve
recsel network.rec -t lxc --expression "name = 'nginx11'" -p proxies[0]
recset network.rec -t lxc --expression "name = 'nginx11'" -f proxies[0] -s wiki9
```

View File

@ -9,77 +9,79 @@ location: krov
ISP: Yettel
%rec: host
%doc: These are the real machines, most of which virtualize.
%type: host rec lxc
%doc: These are the real machines, most of which virtualise.
%key: name
name: Moxx
name: moxx
location: kralizec
name: Serverko
location: krov
%rec: lxc
%doc: A container, usually on a Proxmox host
%type: host rec host
name: nginx-11
name: nginx11
gateway: ISP-router
host: Mox
proxies: wiki-11
proxies: gitea-11
proxies: forum-11
proxies: ejabberd-11
host: moxx
proxies: wiki11
proxies: gitea11
proxies: forum11
proxies: ejabberd11
proxies: dmzrs
name: LDAP
host: Moxx
host: moxx
name: website
host: Moxx
host: moxx
authqueries: LDAP
queries: postgresql-11
queries: postgresql11
service: dmzrs
service: flask accounts
name: gitea-11
name: gitea11
service: gitea
host: Moxx
host: moxx
authqueries: LDAP
queries: postgresql-11
queries: postgresql11
name: ejabberd-11
name: ejabberd11
service: ejabberd
host: Moxx
host: moxx
authqueries: LDAP
queries: postgresql-11
queries: postgresql11
name: forum-11
name: forum11
service: forum
host: Moxx
host: moxx
authqueries: LDAP
queries: postgresql-11
queries: postgresql11
name: postfix-11
name: postfix11
service: postfix
authqueries: LDAP
name: tor-11
name: tor11
service: tor
host: Moxx
host: moxx
name: postgresql-11
name: postgresql11
service: postgresql
host: Moxx
host: moxx
name: wiki-11
name: wiki11
service: wiki
host: Moxx
host: moxx
authqueries: LDAP
name: nginx-12
name: nginx12
host: Serverko
name: nextcloud
host: Serverko
name: tor-12
name: tor12
host: nginx