hiya

As mentioned at the linux workshop I'm in the process of combining fai with yaml-configuration files. My reason is a very wide range of supported configurations. Using classes is quite cumbersome.

As an example I attached the config file for one of our servers, so you can get a general idea how this could pan out. (The format is not final -> work in progress!)

use cases:
- use the file as an interface between class/ and the rest of fai
- use as input for a configuration management software
- let the user manually create such a file and use it for generic fai scripts (make first steps with fai easier?)


Since we're in the process of switching database layouts the first use case is the most important to me at the moment. I have two different configuration backends which both generate the same yaml-files. (In our cases both backends are databases, but it could also be a dns, ldap or no backend at all (store and use files directly). In the end there is a distinct line between configuration logic (class/) and execution logic (scripts/, hooks/).

On a sidenote: I think it is possible to use yaml as a superset to classes - it should be possible to use a yaml-file as input and create appropriate classes on the fly.

example:

config:
  ipv6: false
ssh:
  server:
    enabled: true
    rootlogin: true
    passwordauth: false

could be turned into

no_config_ipv6
ssh_server_enabled
ssh_server_rootlogin
no_ssh_server_passwordauth

tschüß
thomas
---
host:
  domain: tui.t-online.net
  hostname: beldin
---
os:
  arch: X86_64
  type: Debian
  vers: Lenny
---
config:
  IPv6: 0
  Users: ''
  freestyle: ''
  software: ''
---
iface:
  mac: 00:50:56:3F:80:82
ip4:
  -
    ip: 10.255.128.130
    is_auto: true
    is_mgmnt: true
    netmask: 255.255.254.0
    router: 10.255.129.254
---
iface:
  mac: 00:50:56:3F:85:82
ip4:
  -
    id: EXTERNAL
    ip: 10.255.133.130
    is_auto: true
    netmask: 255.255.255.0
    router: 10.255.133.254
---
routes:
  empty
---
ssh:
  client:
    X11fwd: false
  server:
    config: /etc/ssh/sshd_config
    enabled: true
    listen:
      - 10.255.128.130
    rootlogin: true
    passwordauth: false
    protocol: 2,1
---
ssh:
  server:
    config: /etc/ssh/sshd_config_extern
    enabled: true
    listen:
      - 10.255.133.130
    rootlogin: false
    passwordauth: false
    protocol: 2

Antwort per Email an