Source

csistck-examples /

Filename Size Date modified Message
couchdb
fabfile
sys
2.1 KB
1.1 KB
157 B

Csistck Examples

This repository is an example pattern for a csistck-based script. The example roles are pretty crude, but give an idea of how to use various csistck functions.

The layout of the code is an arbitrary example -- how maintenance collections are structured is merely personal preference. I like to keep role definitions and role required files in separate folders, however a flat layout is possible, as is a single file.

Example Output

Calling the manage script will run the csistck based script in interactive mode. This allows you to specify actions to each check failure, and to view file differences before installing files.

[DEBUG] Searching for package via command: cmd=<dpkg -L "couchdb">
[ERROR] Searching for package couchdb, using dpkg: Package missing
What would you like to:
  Y : Repair
  N : Skip
  D : Diff
[Y/n/d]? n
[DEBUG] Hashing file: file=</home/anthony/dev/csistck-examples/couchdb/local.ini>
[DEBUG] File hash successful: file=</home/anthony/dev/csistck-examples/couchdb/local.ini> hash=<176a0364bbfd93c89a5f814d3c5b1b96>
[DEBUG] Hashing file: file=</etc/couchdb/local.ini>
[ERROR] File check on /home/anthony/dev/csistck-examples/couchdb/local.ini: File does not exist: file=</etc/couchdb/local.ini>
What would you like to:
  Y : Repair
  N : Skip
  D : Diff
[Y/n/d]? n
[DEBUG] Hashing file: file=</etc/motd>
[DEBUG] File hash successful: file=</etc/motd> hash=<ea187ca42c5d0e10e7d27f6811cb7da7>
[ERROR] Process template sys/motd for destination /etc/motd: Template output does not match destination
What would you like to:
  Y : Repair
  N : Skip
  D : Diff
[Y/n/d]? d
What would you like to:
  Y : Repair
  N : Skip
  D : Diff
[Y/n/d]? n
[DEBUG] Hashing file: file=</var/run/motd>
[DEBUG] File hash successful: file=</var/run/motd> hash=<ea187ca42c5d0e10e7d27f6811cb7da7>
[ERROR] Process template sys/motd for destination /var/run/motd: Template output does not match destination
What would you like to:
  Y : Repair
  N : Skip
  D : Diff
[Y/n/d]? n