Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

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

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.