Newer
Older
git clone https://gitlab.cs.fau.de/im72ywil/oysterconf ~/config/lib
```
~/config/param.yml
```yml
managedhost:
domain: example.org
manageduser:
```
user running oysterconf must be able to run `ssh manageduser@managedhost.example.org`
~/config/groups.yml
```yml
myfirstgroup:
managedhost:
- manageduser
```
~/data/home/manageduser/myfirstfile
```
hello world
```
~/structure/myfirstgroup/tutorial/managethatfile
```
symlink to -> ../../../data/home/manageduser/myfirstfile
```
~/structure/myfirstgroup/tutorial/55managethatfile-somecomment.frules
```
echo 'myfirstfile has been updated'
```
~structure/myfirstgroup/tutorial/55this-anothercomment.drules
```
echo 'anything in here is new'
```
`~/config/lib/oysterconf managedhost manageduser` will interactively update all managed files for this user on this host, prompting for confirmation of any changes and executing any file rules and directory rules where changes occured.
### frules
must match the name of their respective structure symlink.
```
\d\d<symlink name>-<comment>.frules
```
frules are concatenate with any other frules matching the same symlink
and any found in lib/ in alphabetical order. lib frules are responsible for checking and deploying changes. lib frules can be overridden by specifying the same two digit prefix number. shell state only persist between frules of the same structure symlink.
### drules
follow a similar naming scheme as frules.
```
\d\dthis-<comment>.drules
```
drules can be used to run code if any file referenced from this structure directory has changed. drules are concatenated in the same manner frules are. lib drules are responsible for running frules. shell state persists across all drules. drules are executed in alphabetical order of their full paths.
### templates
files ending in .tmpl inside data/, paths inside data/, frules and drules are subject to templating with the perl [template toolkit](https://template-toolkit.org). files in data can be accompanied by maps to provide template variable definitions separate from the file content.
maps must match their files name
```
```
maps may be shared between different templates by appropriately named symlinks. global template variables for files, paths and rules can be defined in param.yml. template tags are `'{{ '` and `' }}'`.