Inital commit

This commit is contained in:
2023-03-09 00:38:30 +01:00
commit 56fa5970af
3273 changed files with 537628 additions and 0 deletions

2
samples/doc_v1/doc.yaml Normal file
View File

@@ -0,0 +1,2 @@
doc: 'doc'
templates: 'templates'

View File

@@ -0,0 +1,3 @@
title: dokytree Documentation
templates:
node: '@index'

View File

@@ -0,0 +1,5 @@
dokytree is a documentation system.
It is intended to build a node tree document based on yaml file in directory tree.
Pages are rendred with pugjs templates.
You can add addition md, adoc, txt, ... files to extend your documentation.

View File

@@ -0,0 +1,4 @@
index: 1
title: About
headfiles:
- 01.md

View File

@@ -0,0 +1,54 @@
Document is structured as nodes.
The doc object is the root node.
Nodes contains child nodes and items.
```
root
|-nodes
| |-node
| | |-nodes
| | | |-nodes
| | | |-items
| | |-items
| | |-item1
| |-node
| |-nodes
| | |-nodes
| | |-items
| |-items
| |-item1
|-items
```
### Node
``` json
node: {
name: '', // ReadOnly: File name
title: '', // Optional: Title (default: name)
toc: true, // Optional: Show in TOC (default: true)
book: true, // Optional: Include in Book (default: true)
url: '/', // ReadOnly: Node URL
templates: { // Optional
node: '@node', // Optional: Node template (default: @node)
items: '@item', // Optional: Items template (default: @item)
},
parent: null, // ReadOnly: Parent node
nodes: [], // ReadOnly: Child nodes
items: [], // ReadOnly: Items
getNode: (name) => {}, // Function: Get child node by name
getItem: (name) => {}, // Function: Get item by name
}
```
### Item
``` json
item: {
name: '', // Optional: Name
title: '', // Optional: Title (default: name)
toc: false, // Optional: Show in TOC (default: false)
book: true, // Optional: Include in Book (default: true)
url: '', // ReadOnly: Item URL
data: {}, // ReadOnly: Item Data
}
```

View File

@@ -0,0 +1,4 @@
index: 4
title: Document
files:
- 01.md

View File

@@ -0,0 +1,17 @@
```
doc
|- doc/ # Documentation tree
| |- category/ # Child node
| | |- _index.yaml # Node information
| | |- item1.yaml # Item data
| | |- item1.01.md # Item extra file
| |- _index.yaml # Node information
| |- _index.01.md # Node extra file
| |- _index.01.txt # Node extra file
| |- _index.01.pug # Node extra file
| |- _index.01.svg # Node extra file
|- templates/ # Pug Templates
| |- template1.pug # A pugjs template
| |- template2.pug # A pugjs template
|- doc.yaml # Documentation main file
```

View File

@@ -0,0 +1,3 @@
title: Tree
headfiles:
- 01.md

View File

@@ -0,0 +1,4 @@
``` yaml
doc: 'doc' # Optional: Documentation directory
templates: 'templates' # Optional: Templates directory
```

View File

@@ -0,0 +1,3 @@
title: doc.yaml
files:
- 01.md

View File

@@ -0,0 +1,15 @@
``` yaml
index: 1 # Optional: Override node index
title: Documentation # Optional: Override node title
toc: true # Optional: Show in TOC (default: true)
book: true # Optional: Include in book (default: true)
templates: # Optional: Templates
node: 'template1' # Optional: Node template (default: @node)
items: 'template2' # Optional: Items template (default: @item)
headfiles: # Optional: Additional file on top of node document
- 01.md
files: # Optional: Additional file in node document
- 01.md
footfiles:
- 01.md # Optional: Additional file at bootom of node document
```

View File

@@ -0,0 +1,3 @@
title: _index.yaml
files:
- 01.md

View File

@@ -0,0 +1,9 @@
``` yaml
name: Item1 # Optional: Override name of item
headfiles: # Optional: Additional file on top of node document
- 01.md
files: # Optional: Additional file in node document
- 01.md
footfiles: # Optional: Additional file at bootom of node document
- 01.md
```

View File

@@ -0,0 +1,3 @@
title: item.yaml
files:
- 01.md

View File

@@ -0,0 +1,9 @@
You can store additionnal files related to the yaml file.
As exemple, with _index.yaml, you can add _index.01.md or _index.01.svg.
You can use the same method with item.yaml files.
Thoses files can be added as headfile, file or footfiles just using 01.md or 01.svg.
### Supported extentions
Text: txt adoc
Parsed: md html pug
Images: svg png jpg jpeg gif bmp

View File

@@ -0,0 +1,3 @@
title: .file.ext
files:
- 01.md

View File

@@ -0,0 +1,19 @@
``` pug
div#HEADFILES // Headfiles container
// Your pugjs code
div#FILES // Files container
// Your pugjs code
div#FOOTFILES // Footfiles container
```
### Informations
pugjs documentation can be found here :
[https://pugjs.org/](https://pugjs.org/)
When you use pugjs with dokytree, you have some additional objets :
```
doc // The document root node
node // The current node
compareIP // A helper to sort IP v4
```

View File

@@ -0,0 +1,3 @@
title: template.pug
files:
- 01.md

View File

@@ -0,0 +1,4 @@
index: 3
title: Structure
templates:
- node: '@overview'

View File

@@ -0,0 +1,14 @@
```
node app.js [args] docfile.yaml
-p | --port Set listen port (default : 3000)
-b | --bind Set listen ip (default : 127.0.0.1)
```
This command start the documentation server.
You can use it to view your changes.
Then you can click on book link and print your doc as pdf.
### Additional tools
VSCode - Editor for your documentation.
Chromium or derived browser - To print PDF with converted link.
Draw.io - Editor for schemas.

View File

@@ -0,0 +1,4 @@
index: 2
title: Usage
headfiles:
- 01.md

View File

@@ -0,0 +1,4 @@
doc: 'doc'
templates: 'templates'
html: 'html'
style: 'style.css'

View File

@@ -0,0 +1 @@
title: Documentation

View File

@@ -0,0 +1,3 @@
#sidepanel {
background-color: red;
}

View File

@@ -0,0 +1,3 @@
div#HEADFILES
div#FILES
div#FOOTFILES

2
samples/it_v1/doc.yaml Normal file
View File

@@ -0,0 +1,2 @@
doc: 'doc'
templates: 'templates'

View File

@@ -0,0 +1 @@
h2 Company SA

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../schemas/_index.json
title: IT Documentation
templates:
node: '@empty'
headfiles:
- 01.pug

View File

@@ -0,0 +1,5 @@
# yaml-language-server: $schema=../../schemas/_index.json
index: 4
title: 'Active Directory'
templates:
node: '@overview'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 5
title: 'ACLS'
toc: false
book: false
templates:
node: 'acls'

View File

@@ -0,0 +1,31 @@
# yaml-language-server: $schema=../../../schemas/ad_acls.json
name: 'FS-01'
folders:
- path: 'D:\Shares\Documents'
acls:
- name: 'Company'
access: 'RO'
- path: 'D:\Shares\Documents/Direction'
acls:
- name: 'Company Direction'
access: 'RW'
- path: 'D:\Shares\Documents/RH'
acls:
- name: 'Company Direction'
access: 'RO'
- name: 'Company RH'
access: 'RW'
- path: 'D:\Shares\Documents/Accounting'
acls:
- name: 'Company Direction'
access: 'RO'
- name: 'Company Accounting'
access: 'RW'
- path: 'D:\Shares\Documents/Secretariat'
acls:
- name: 'Company Direction'
access: 'RO'
- name: 'Company RH'
access: 'RO'
- name: 'Company Secretariat'
access: 'RW'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 3
title: 'DFS'
toc: false
book: false
templates:
node: 'dfs'

View File

@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../../schemas/ad_dfs.json
name: 'ROOT'
path: '\\DOMAIN.local\ROOT'
targets:
- '\\FS-01\ROOT'
folders:
- name: 'Documents'
targets:
- '\\FS-01\Documents'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 1
title: 'Domains'
toc: false
book: false
templates:
node: 'domains'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/ad_domain.json
name: 'DOMAIN.local'
dc:
- name: 'dc-01'
fsmo: 'all'
servers:
- name: 'fs-01'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 3
title: 'Shares'
toc: false
book: false
templates:
node: 'shares'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/ad_shares.json
name: FS-01
fileshares:
- path: '\\FS-01\Documents'
printshares:
- path: '\\FS-01\MFC-01'
- path: '\\FS-01\PRINTER-01'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 2
title: 'Usergroups'
toc: false
book: false
templates:
node: 'usergroups'

View File

@@ -0,0 +1,8 @@
# yaml-language-server: $schema=../../../schemas/ad_usergroups.json
name: DOMAIN.local
usergroups:
- name: 'Company'
- name: 'Company Management'
- name: 'Company RH'
- name: 'Company Accounting'
- name: 'Company Secretariat'

View File

@@ -0,0 +1,5 @@
# yaml-language-server: $schema=../../schemas/_index.json
index: 3
title: Devices
templates:
node: '@overview'

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 4
title: Computers
toc: false
templates:
node: 'computers'

View File

@@ -0,0 +1,20 @@
# yaml-language-server: $schema=../../../schemas/computer.json
name: 'computer-01'
type: ''
model: ''
os: 'Windows 11 Pro'
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.21'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns:
- '10.10.10.1'
updates:
- type: 'os'
method: 'auto'
frequency: 'auto'
time: 'auto'
backups:
- type: 'none'

View File

@@ -0,0 +1,23 @@
# yaml-language-server: $schema=../../../schemas/computer.json
todo:
- msg: 'Replace computer'
priority: 20
name: 'computer-02'
type: ''
model: ''
os: '! Windows 7 Pro'
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.22'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns:
- '10.10.10.1'
updates:
- type: 'os'
method: 'auto'
frequency: 'auto'
time: 'auto'
backups:
- type: 'none'

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 1
title: Network
toc: false
templates:
node: 'netdevs'

View File

@@ -0,0 +1,33 @@
# yaml-language-server: $schema=../../../schemas/netdev.json
name: 'firewall-01'
roles:
- Firewall
- DHCP
- DNS
- VPN
- VLAN
model: 'Generic Firewall'
os: 'Linux'
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.1'
mask: '255.255.255.0'
- name: 'GUEST'
ip: '192.168.5.1'
mask: '255.255.255.0'
- name: 'VPN'
ip: '192.168.9.1'
mask: '255.255.255.0'
- name: 'WAN'
ip: '0.0.0.0'
mask: '255.255.255.255'
updates:
- type: 'os'
method: 'auto'
frequency: 'tuesday'
time: '12:30'
backups:
- type: 'manual'
content: 'config'
frequency: 'On change'

View File

@@ -0,0 +1,19 @@
# yaml-language-server: $schema=../../../schemas/netdev.json
name: 'switch-01'
model: ''
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.231'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns: [ '10.10.10.1' ]
updates:
- type: 'os'
method: 'manual'
frequency: 'yearly'
time: '-'
backups:
- type: 'manual'
content: 'config'
frequency: 'On change'

View File

@@ -0,0 +1,19 @@
# yaml-language-server: $schema=../../../schemas/netdev.json
name: 'wifi-01'
model: ''
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.241'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns: [ '10.10.10.1' ]
updates:
- type: 'os'
method: 'manual'
frequency: 'yearly'
time: '-'
backups:
- type: 'manual'
content: 'config'
frequency: 'On change'

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 8
title: Printers
toc: false
templates:
node: printers

View File

@@ -0,0 +1,12 @@
# yaml-language-server: $schema=../../../schemas/printer.json
name: 'mfc-01'
type: mfc
model: ''
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.211'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns:
- '10.10.10.1'

View File

@@ -0,0 +1,12 @@
# yaml-language-server: $schema=../../../schemas/printer.json
name: 'printer-01'
type: printer
model: ''
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.212'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns:
- '10.10.10.1'

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 2
title: Servers
toc: false
templates:
node: 'servers'

View File

@@ -0,0 +1,26 @@
# yaml-language-server: $schema=../../../schemas/server.json
name: 'dc-01'
type: ''
roles: [ 'DC' ]
model: ''
os: 'Windows Server 2019 Std'
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.110'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns:
- '127.0.0.1'
updates:
- type: 'os'
method: 'auto'
frequency: 'friday'
time: 23:30
backups:
- type: 'Windows Backup'
content: 'All'
frequency: daily
time: 20:30
duration: ''
target: 'External HDD'

View File

@@ -0,0 +1,28 @@
# yaml-language-server: $schema=../../../schemas/server.json
name: 'fs-01'
type: ''
roles:
- 'File server'
- 'Print server'
model: ''
os: 'Windows Server 2019 Std'
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.111'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns:
- '10.10.10.1'
updates:
- type: 'os'
method: 'auto'
frequency: 'friday'
time: 23:30
backups:
- type: 'Windows Backup'
content: 'All'
frequency: daily
time: 20:30
duration: ''
target: 'External HDD'

View File

@@ -0,0 +1,30 @@
# yaml-language-server: $schema=../../../schemas/server.json
todo:
- msg: 'Add a new NAS server for backup'
priority: 20
name: 'nas-01'
type: ''
roles:
- 'Backup server'
model: ''
os: ''
location: ''
interfaces:
- name: 'LAN'
ip: '10.10.10.119'
mask: '255.255.255.0'
gw: '10.10.10.1'
dns:
- '10.10.10.1'
updates:
- type: 'os'
method: 'auto'
frequency: 'friday'
time: 23:30
backups:
- type: 'Internal Backup'
content: 'All'
frequency: daily
time: 20:30
duration: ''
target: 'External HDD'

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../schemas/_index.json
index: 1
title: Index
toc: false
templates:
node: '@index'

View File

@@ -0,0 +1,5 @@
# yaml-language-server: $schema=../../schemas/_index.json
index: 100
title: Maintenance
templates:
node: '@overview'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 3
title: Backups
toc: false
book: false
templates:
node: backups

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 1
title: TODOS
book: false
templates:
node: todos

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 5
title: Updates
toc: false
book: false
templates:
node: updates

View File

@@ -0,0 +1,10 @@
h2 Overview
div.section
h3 WAN
img(class="largeimage", src="/network/subnets?itm=05_wan&res=01.svg")
div.section
h3 GUEST
img(class="largeimage", src="/network/subnets?itm=02_guest&res=01.svg")
div.section
h3 LAN
img(class="largeimage", src="/network/subnets?itm=01_lan&res=01.svg")

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../schemas/_index.json
index: 2
title: Network
templates:
node: '@overview'
headfiles:
- 01.pug

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 10
title: IPAM
toc: false
book: false
templates:
node: ipam

View File

@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2023-03-05T19:38:17.298Z" agent="5.0 (X11)" etag="oCyCbZFZh5oQalXICPcC" version="21.0.2" type="device"><diagram id="b6ezudLEMjEVSUdVGraq" name="Page-1">7Zpbc5s4FIB/jR/NcBPYj7HjNNvtTjPtzra7Lx4ZBFYCiEryrb++khCYq5NJ7aaeWfAM6EhIQuecT0fCI2ee7t9RmK//IiFKRrYZ7kfO7ci2Ldt3xUVKDoXEA5NCEFMc6kJHwWf8HWmhqaUbHCLWKMgJSTjOm8KAZBkKeEMGKSW7ZrGIJM1WcxijjuBzAJOu9AsO+bqQTmz/KL9HOF6XLVvetMhJYVlYvwlbw5DsaiJnMXLmlBBe3KX7OUrk4JXjUjx3N5BbdYyijL/kgRl7OCzGDh3/8+W/b05m0TTdjj2gO8cP5RujUAyAThLK1yQmGUwWR+mMkk0WIlmtKVLHMh8IyYXQEsJHxPlBaxNuOBGiNU8TnSt6TA9f5fOGOXVLwb+6QpW43TdSh3rqAVGcIo6oFkYk43OSEKpewDHVIeSMQ8pvpBGIjCCBjOGgFN/hpOxNdyD12DKyoYEele+fwLfFPVtCch9R92v08eZPNLZKi4Q0RvzEMOtycmhrLWg9vUNEvA09iAIUJZDjbdP2oDbhuCp31LK40YruV/rJbm9hstFNsR3mwXpsWh1zqKltiyjHwjU+wBVKHgjDHJNM5HGp9ir3JsGxlK4I5ySVBrLhCc7QvPJQpZvSG2QihGxd2ZPIyWXb6T6WSDEoDJ6MdY6WkG5W0Ch6ipjxOJ0ADy5t4JhL242XNovyPNmwZVFC1JS0+hkIBUujmUHdxUowaALypdD+pM50rqO5pjnnaq/fHaFhuXYhW9eBAX5eyadMrqbjU6qNhDvUXGiuDuUrlDyhWo43mVgzR+QI5YQYHR0vIxmqiW8xFcouxj2TiKgqKzFq9+g6Q3xH6BMzVhv2ujZaLIjUIeR5jRkrYVErUVWNI7NSppllmxexCsvrmoUPesyinDTObhZe1wx+LfCFBV0F8PudCvzuwD/Z7QYMvIRL9OKtuI3l7Q5HWM0ARY5oqZbZsZqc4IyrjoKZ+ImZ3BnZc6lfeRkBUWau5NZECZpCUJR1W+KJ3VN26vdVbCmh53cKF1Xra6tJqyUz7YHSrcrF77npjz0hNesoA+2ZNDvTImR5MR1GeC99qzsrqSFGdLFFxUhbPcQMMAuINTV2goUJYmKmDwJ5Uc92we7eyrMDdg3WIb8anEjPQEh7aj43cQKzC0hwKUC63ltHxADUAWkZpu9cFSTt64Sk3YVkGPRFxA1PH/DRgdi2pvF+B2x6KzDlecoBh5hUUaaNnwJWvSF5hz9t1pAowgEyGKKiVmaEJIU4W4qVt3iVJFGPDBndGUABPAM0SNGHChf0oOJSIbbrvzEqrEkjlrKuCxPedWLC62AiYv9jYhgTorNoWSQuCwjr9YTwLmQsvtkxi19LiCvZXesdPMe5SkCU3a4BIo16A4mhkR1cMpxegbx8u6tmK70u/vLdIHVcfDcoIDk+13rDt55db/g96w3/YhsykzdGhOdfMSM8/9y+rx99UOvnympc4BoT159Wh9cwompfr6yxYJaupGUhVa9+wmj8bhAiXGwHk6QPNK/buWhRwJ7IcygkGWRWX+TzbAihdjWWDEYyjAg2FPPDEouFhowmitd8o90K13mWHu7U6AkxnDMsQv52wR+r9+9tsj+ku+mnj5w+OmPrbTZ095gX+AA6VbFD3B/RIRMNcuiwBDijxh7Hq5Yu56RL79j+9iuUU72usSGnygd7Vyna83CqPoSf2rlsfuYbXEoo95vB4ClWVtb3MUY1dlPuf6pFRXszVPfnds25/NJ/I4fEvgvCzDUkCCIs7JeKwCCV29SQQ3FRgBDXYv0x5sJWRApIB7nzhZ9MjDyLzxFBtBhgOxfbshTJ4x8Eisnj+DcLZ/ED</diagram></mxfile>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../../schemas/subnet.json
name: LAN
subnet: 10.10.10.0/24
gw: 10.10.10.1
dns:
- 10.10.10.1
dhcp:
server: '10.10.10.1'
ranges:
- from: '10.10.10.50'
to: '10.10.10.169'

View File

@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2023-03-05T19:35:23.361Z" agent="5.0 (X11)" etag="2wwb6xFnzrKgUXp9-2X4" version="21.0.2" type="device"><diagram id="b6ezudLEMjEVSUdVGraq" name="Page-1">5VfJbtswEP0aHy1oteNjYqdNNzRoCjQ3gZFGEhtKVEnacvL1JS1Su7MgblGgNmBTb4bUcN7jjDTz1vn+PUNl9oXGQGauHe9n3mbmuo679OWfQh5qZBGc1UDKcKydWuAGP4IGbY1ucQy85ygoJQKXfTCiRQGR6GGIMVr13RJK+nctUarvaLfATYQIjNx+4FhkNXrmLlv8CnCamTs7i1VtyZFx1gvzDMW06kDe5cxbM0pFPcr3ayAqeSYv9bx3R6xNYAwK8ZIJj9+CX5dXPET0KmH+bfL1/BPMHb3MDpGt3jGvsIiyua0tXDyYXGQiJ3LkzLyLHTCBZZY+ozsg15RjgWkhbYKWHes5walC76gQNJcGuhUEF7BuyLIl2CRGXcSIZxC3llLdO9+nSl0WQ9G9lZUQIra9Q1YdKXDr5+osWKDQDTw7dP00dHlSlmTLw9pDrkQGcUYyacCkAekQG2CcVpMiuSnYdyCd5vdAcxDsQbpo68LXlBvN+1ZQA1UrIcd3ayzrykf7Ia3atFm7JVYONLev4NnotcPzTYU5jyQtQ5onSerxcoz9huehAGpZjHLdEdSQalRxz8LKrwARymRfJJiQNSWUHaL0Nu7G23gSl/4xlisaW0ELOA2PAxrNZZdE2x6TuPD/EImeNyJxRB7EsnzpS8pERlNaIHLZoheMbou4obL1+UwVSQcyfoIQD7oWo62gfaoS2iZbEmEfPopCgZg4VzVXcUwQ5zgy8DtMzPSjxHC6ZRG8QMRywRTEU4nSK6pkPEk0A4IE3vVr/RRveuo1lZLsCMTpK2Tp9leod6QnDchvoniDHvyRHnYEFRIxcf0nwjB8PysM5+TCeNuBHnffBDOoECFT/fdYfqer7bNF+uU9scPxZHMYlOb14XNgmNF76Fj8jfoeL9oG3sgsRDqsQimxWcw8hLkTPUN2ioqye25JJZ+smfurQTN3Rl1gOdEEXPftmoEoWUcfv2zmwSdIl/Z6Ht5+n7v/1pk/5dme3O9fKuVLe9Uv5Str8CxWF5dTFPOn9tnhtcIJnioDpQrhEFRwMQvUaUK8rA9jgveKzC5Bo8N8/HEb54eXIfO/wXkqt0LwnfyVJQlDHAogwDGXQCWPqByr4XkUyUF4SE34oYgpZRbfpSd6mF7Z1rJHjeOOH8S8hbUYH8LAN+grjqG8bF/KanbbV1vv8jc=</diagram></mxfile>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,13 @@
# yaml-language-server: $schema=../../../schemas/subnet.json
name: GUEST
subnet: 192.168.5.0/24
gw: 192.168.5.1
dns:
- 192.168.5.1
vlans:
- 10
dhcp:
server: '192.168.5.1'
ranges:
- from: '192.168.5.10'
to: '192.18.5.199'

View File

@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../../schemas/subnet.json
name: VPN
subnet: 192.168.9.0/24
gw: 192.168.9.1
dns:
- 192.168.9.1
dhcp:
server: '192.168.9.1'
ranges:
- from: '192.168.9.2'
to: '192.168.9.254'

View File

@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2023-03-05T19:31:14.845Z" agent="5.0 (X11)" etag="FslN_q_c38xDY7rFevKs" version="21.0.2" type="device"><diagram id="b6ezudLEMjEVSUdVGraq" name="Page-1">5VbLVtswEP2aLPHxKwksIQnQU3rKKYt25yPssS2QPa4k44SvrxTLr9jhUeiqySLWndFIuvdm5Jm3yrZXnBTpN4yAzVw72s689cx1HXfpqx+N7GpkMT+tgYTTyCR1wB19BgPaBi1pBGKQKBGZpMUQDDHPIZQDjHCO1TAtRjZctSAJjIC7kLAx+pNGMq3RU3fZ4ddAk7RZ2Vmc1ZGMNMnmJCIlEVY9yNvMvBVHlPVTtl0B0+Q1vNTzLo9E241xyOVbJjz/mP/eXIuA4HXM/V/x9/OvcOKYMk+ElebEoqIyTE9sExFy13CRyoypJ2fmXTwBl1SxdEPugd2ioJJirmL3KCVmvYRzRhMdkFgoFEvJaA6rVixbgS0xehARkULURQq9drZNtLssTsJHKy0gILy8J1a9UxDWw9npfEECd+7ZgesngSviomClCOoMVWlMVnNwtU/Y9iBD3hVgBpLvVIqJLnwjZONk35rXQNUZw/HdGkv7pjB5xHgxaWt3cqkHo9g71Gtc2FPvSy6B5yBH4k1SP2D7LzUlZhSCXloBPZscCkgq4VnUbDFQZF/ElLEVMuT7XXprd+2tPYWr/Iiqik0sxxw+R8cDGZthX0TbHou48P+RiJ43EnEkHkSqKZkhcpligjlhmw694FjmUStll3ODWqS9GA8g5c50WFJKHEoVY0e2EsLef7SEknB5rjup1pgRIWjYwJeUNdOPCiOw5CG8wcSqYALyJaJMRU3Gi0JzYETSp2EHn9LNTL1FZcmeQZyhQ5busEJ9IjPpQPx2Fx/wg/9/+6GR+VU/OJ/uh4/9j8dXaUw5VISxqcv0GL/TTfbV3swOAm03fqk9T94JBx15tf/sFeb4CL2Iv9bf4726gdeKhdBsK9dObIs1b1TuxFWhLogK+aOwlJPrjX9G7z87uMOdUfNfTvR+1323Z9Swe7WrW0P3guxt/gA=</diagram></mxfile>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../../schemas/subnet.json
name: WAN
subnet: 0.0.0.0/32

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 1
title: Subnets
toc: false
book: false
templates:
node: subnets

View File

@@ -0,0 +1,4 @@
# yaml-language-server: $schema=../../../schemas/wifi.json
name: LAN
ssid: 'Company-WIFI'
key: 'feDFw848$435dEWs'

View File

@@ -0,0 +1,4 @@
# yaml-language-server: $schema=../../../schemas/wifi.json
name: GUEST
ssid: 'GUEST-WIFI'
key: 'Visitors'

View File

@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../schemas/_index.json
index: 2
title: WIFI
toc: false
book: false
templates:
node: wifis

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../schemas/_index.json
index: 1000
title: Secrets
templates:
node: 'secrets'
items: '@none'

View File

@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../schemas/secrets.json
name: AD
secrets:
- type: AD
user: Administrator
password: 'Pa$$w0rd'
- type: AD
user: LocalAdmin
password: 'SimplePass'

View File

@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../schemas/secrets.json
name: Microsoft 365
secrets:
- type: https
user: admin@companysa.onmicrosoft.com
password: 'MySuperPassword'
mfa:
- type: totp
value: 'JEWRF85D23NNMEISL3j'
- type: sms
value: '+000000000000'

View File

@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../schemas/secrets.json
name: Windows
secrets:
- type: USER
user: Administrator
password: 'Pa$$w0rd'

View File

@@ -0,0 +1,5 @@
# yaml-language-server: $schema=../../schemas/_index.json
index: 10
title: Softwares
templates:
node: 'softwares'

View File

@@ -0,0 +1,3 @@
### Additional informations
Before you begin, ....

View File

@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../schemas/software.json
name: 'Software 1'
publisher: 'Software Inc'
licenses: '4'
urls:
- website: 'https://soft.home'
- download: 'https://soft.download'
files:
- notes.md

View File

@@ -0,0 +1,73 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"index": { "type": "integer" },
"title": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"book": { "type": "boolean" },
"toc": { "type": "boolean" },
"templates": {
"type": "object",
"properties": {
"node": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"items": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,118 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"folders": {
"type": "array",
"items": {
"properties": {
"path": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"acls": {
"type": "array",
"items": {
"properties": {
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"access": {
"oneOf": [
{"type": "string"},
{"enum": [
"''",
"'RO'",
"'RW'",
"'traversal'",
"'DENY'"
]}
]
}
}
}
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,121 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"path": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"targets": {
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
},
"folders": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"targets": {
"type": "array",
"items": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,116 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"dc": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"fsmo": {
"oneOf": [
{"type": "string"},
{"enum": [
"''",
"'all'"
]}
]
}
}
}
},
"servers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,107 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"fileshares": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"printshares": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,91 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"usergroups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,333 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": {
"type": "string",
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'notebook'",
"'rack'",
"'slim'",
"'small'",
"'tower'",
"'vm'"
]}
]
},
"model": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"os": {
"type": "string",
"anyOf": [
{ "type": "string" },
{"enum": [
"''",
"'Windows XP Home'",
"'Windows XP Pro'",
"'Windows Vista Home'",
"'Windows Vista Pro'",
"'Windows 7 Home'",
"'Windows 7 Pro'",
"'Windows 8 Home'",
"'Windows 8 Pro'",
"'Windows 10 Home'",
"'Windows 10 Pro'",
"'Windows 11 Home'",
"'Windows 11 Pro'"
]}
]
},
"location": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"interfaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'LAN'",
"'WIFI'",
"'WAN'",
"'VPN'"
]}
]
},
"ip": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"mask": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'255.255.255.0'",
"'255.255.0.0'",
"'255.0.0.0'"
]}
]
},
"gw": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"dns": {
"type": "array",
"items": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
}
},
"updates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'os'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"backups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'none'",
"'hypervisor'",
"'windowsbackup'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"target": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'usb'",
"'pbs'",
"'share'",
"'iscsi'",
"'cloud'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,337 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": {
"type": "string",
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'box'",
"'rack'",
"'wall'",
"'ceiling'"
]}
]
},
"roles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'DHCP'",
"'DNS'",
"'VPN'",
"'Firewall'",
"'Router'"
]}
]
}
},
"model": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"os": {
"type": "string",
"anyOf": [
{ "type": "string" },
{"enum": [
"''",
"'Linux'",
"'Debian'"
]}
]
},
"location": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"interfaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'LAN'",
"'WIFI'",
"'WAN'",
"'VPN'"
]}
]
},
"ip": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"mask": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'255.255.255.0'",
"'255.255.0.0'",
"'255.0.0.0'"
]}
]
},
"gw": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"dns": {
"type": "array",
"items": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
}
},
"updates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'os'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"backups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'none'",
"'hypervisor'",
"'windowsbackup'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"target": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'usb'",
"'pbs'",
"'share'",
"'iscsi'",
"'cloud'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,309 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": {
"type": "string",
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'printer'",
"'mfc'",
"'large printer'"
]}
]
},
"model": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"location": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"interfaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'LAN'",
"'WIFI'",
"'WAN'",
"'VPN'"
]}
]
},
"ip": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"mask": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'255.255.255.0'",
"'255.255.0.0'",
"'255.0.0.0'"
]}
]
},
"gw": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"dns": {
"type": "array",
"items": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
}
},
"updates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'os'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"backups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'none'",
"'hypervisor'",
"'windowsbackup'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"target": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'usb'",
"'pbs'",
"'share'",
"'iscsi'",
"'cloud'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,104 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"secrets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"oneOf": [
{"type": "string"},
{"enum": [
"'ad'",
"'https'",
"'ssh'",
"'user'"
]}
]
},
"user": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"password": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"mfa": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"oneOf": [
{"type": "string"},
{"enum": [
"''",
"'totp'",
"'sms'",
"'e-mail'"
]}
]
},
"value": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,354 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": {
"type": "string",
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'mini'",
"'rack'",
"'tower'",
"'vm'"
]}
]
},
"roles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'DHCP'",
"'DNS'",
"'VPN'",
"'Firewall'",
"'DC'",
"'File Server'",
"'Print Server'",
"'App Server'",
"'Backup Server'",
"'Hypervisor'"
]}
]
}
},
"model": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"os": {
"type": "string",
"anyOf": [
{ "type": "string" },
{"enum": [
"''",
"'Windows 2000'",
"'Windows 2003'",
"'Windows 2008'",
"'Windows 2008 R2'",
"'Windows 2012'",
"'Windows 2012 R2'",
"'Windows 2016'",
"'Windows 2019'",
"'Windows 2021'",
"'Debian'",
"'Debian / Proxmox VE'",
"'Debian / Proxmox BS'",
"'FreeBSD / OPNSense'",
"'FreeBSD / pfSense'"
]}
]
},
"location": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"interfaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'LAN'",
"'WIFI'",
"'WAN'",
"'VPN'"
]}
]
},
"ip": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"mask": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'255.255.255.0'",
"'255.255.0.0'",
"'255.0.0.0'"
]}
]
},
"gw": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"dns": {
"type": "array",
"items": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
}
},
"updates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'os'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"backups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'none'",
"'hypervisor'",
"'windowsbackup'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"target": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'usb'",
"'pbs'",
"'share'",
"'iscsi'",
"'cloud'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,116 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"publisher": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"licenses": {
"oneOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
},
"urls": {
"type": "array",
"items": {
"type": "object",
"properties": {
"website": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"download": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,172 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''",
"'LAN'",
"'LAN01'",
"'LAN02'",
"'LAN03'",
"'LAN04'",
"'LAN06'",
"'LAN07'",
"'LAN08'",
"'LAN09'",
"'LAN10'",
"'WAN'",
"'WIFI'",
"'GUEST'",
"'DMZ'",
"'VPN'"
]}
]
},
"subnet": {
"type": "string",
"oneOf": [
{ "type": "string" },
{ "enum": [
"''",
"'192.168.0.0/24'",
"'192.168.1.0/24'"
]}
]
},
"gw": {
"oneOf": [
{ "type": "string" },
{ "enum": [
"''",
"'192.168.0.1'",
"'192.168.1.1'"
]}
]
},
"dns": {
"type": "array",
"items": {
"oneOf": [
{ "type": "string" },
{ "enum": [
"''",
"'192.168.0.1'",
"'192.168.1.1'"
]}
]
}
},
"vlans": {
"type": "array",
"items": {
"type": "integer"
}
},
"dhcp": {
"type": "object",
"properties": {
"server": {
"oneOf": [
{ "type": "string" },
{ "enum": [
"''",
"'192.168.0.1'",
"'192.168.1.1'"
]}
]
},
"ranges": {
"type": "array",
"items": {
"properties": {
"from": {
"oneOf": [
{ "type": "string" },
{ "enum": [
"''",
"'192.168.0.20'",
"'192.168.1.20'"
]}
]
},
"to": {
"oneOf": [
{ "type": "string" },
{ "enum": [
"''",
"'192.168.0.99'",
"'192.168.1.99'"
]}
]
}
}
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,309 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": {
"type": "string",
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'phone'",
"'antenna'",
"'gateway'"
]}
]
},
"model": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"location": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"interfaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'LAN'",
"'WIFI'",
"'WAN'",
"'VPN'"
]}
]
},
"ip": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"mask": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'255.255.255.0'",
"'255.255.0.0'",
"'255.0.0.0'"
]}
]
},
"gw": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"dns": {
"type": "array",
"items": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
}
},
"updates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'os'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"backups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'none'",
"'hypervisor'",
"'windowsbackup'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"target": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'usb'",
"'pbs'",
"'share'",
"'iscsi'",
"'cloud'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,106 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "YAML Schema for computer",
"type": "object",
"additionalProperties": false,
"properties": {
"todo": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"anyOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"priority": { "type": "integer" },
"duration": {
"anyOf": [
{"type": "integer"},
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}
},
"name": {
"oneOf": [
{"type": "string"},
{"enum": [
"''",
"'LAN'",
"'LAN01'",
"'LAN02'",
"'LAN03'",
"'LAN04'",
"'LAN06'",
"'LAN07'",
"'LAN08'",
"'LAN09'",
"'LAN10'",
"'WAN'",
"'WIFI'",
"'GUEST'",
"'DMZ'",
"'VPN'"
]}
]
},
"ssid": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"key": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"headfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"files": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
},
"footfiles": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''"
]}
]
}
}
}
}

View File

@@ -0,0 +1,52 @@
#!/bin/bash
declare -r PARTDIR=./parts
declare -r SCHEMADIR=../schemas
declare -r OBJECTSDIR=./objects
getSchemaHeader() {
local DOC="{\n"
DOC+="\t\""'$schema'"\": \"http://json-schema.org/draft-07/schema#\",\n"
DOC+="\t\"title\": \"YAML Schema for computer\",\n"
DOC+="\t\"type\": \"object\",\n"
DOC+="\t\"additionalProperties\": false,\n"
DOC+="\t\"properties\": {\n"
echo -e "${DOC}"
}
getSchemaFooter() {
local DOC+="\t}\n"
DOC+="}\n"
echo -e "${DOC}"
}
getPart() {
local -r PARTFILE=${PARTDIR}/${1}.json
if [ ! -f "${PARTFILE}" ]; then
echo "${PARTFILE} not found"
exit 1
fi
tail -n +4 "${PARTFILE}" | head -n -2
}
buildObject() {
local -r OBJECTFILE=${1}
local DOC=$(getSchemaHeader)"\n"
while IFS= read -r LINE; do
if [[ ! $LINE =~ ^[[:space:]]*\#.*$ ]]; then
if [ -f ${PARTDIR}/"${LINE}".json ]; then
DOC+=$(getPart "${LINE}")",\n"
else
echo "Error: Part not found : ${LINE} in ${OBJECTFILE}"
fi
fi
done < "${OBJECTFILE}"
DOC="${DOC::-3}\n"
DOC+=$(getSchemaFooter)
local SCHEMAFILE=${SCHEMADIR}/$(basename "${OBJECTFILE}").json
echo -e "${DOC}" > "${SCHEMAFILE}"
}
for OBJECTFILE in "${OBJECTSDIR}"/*; do
buildObject "${OBJECTFILE}"
done

View File

@@ -0,0 +1,6 @@
index
title
book
toc
templates
files

Some files were not shown because too many files have changed in this diff Show More