2011-02-02 13:02:29 +00:00
|
|
|
#
|
|
|
|
# This is a sample manifest, but used in real world
|
|
|
|
#
|
|
|
|
|
2011-02-24 14:14:00 +00:00
|
|
|
# This is debug and should not be in a production environment
|
2011-03-09 19:22:02 +00:00
|
|
|
# echo "We could access other manifests in $__manifest"
|
2011-02-24 14:14:00 +00:00
|
|
|
|
2011-03-09 19:22:02 +00:00
|
|
|
# Every machine becomes a marker, so sysadmins know that automatic
|
|
|
|
# configurations are happening
|
2011-02-26 19:43:30 +00:00
|
|
|
__file /etc/cdist-configured --type file
|
2011-02-25 01:13:11 +00:00
|
|
|
|
2011-02-24 14:14:00 +00:00
|
|
|
case "$__target_host" in
|
2011-03-03 07:55:02 +00:00
|
|
|
# Everybody has this
|
2011-02-22 16:25:31 +00:00
|
|
|
localhost)
|
2011-02-23 08:10:17 +00:00
|
|
|
__file test --type file --destination /tmp/cdist-testfile
|
2011-02-18 23:01:39 +00:00
|
|
|
;;
|
2011-02-22 15:11:07 +00:00
|
|
|
|
2011-03-09 19:22:02 +00:00
|
|
|
#
|
|
|
|
# Examples using different types
|
|
|
|
#
|
|
|
|
|
2011-03-02 22:34:34 +00:00
|
|
|
# Alias in /etc/hosts for localhost
|
|
|
|
cdist-archlinux)
|
2011-03-09 19:22:02 +00:00
|
|
|
# This is the specific package type for pacman
|
2011-03-02 22:34:34 +00:00
|
|
|
__package_pacman zsh --state installed
|
2011-03-09 19:22:02 +00:00
|
|
|
|
|
|
|
# The __package type autoselect the right type based on the os
|
|
|
|
__package vim --state installed
|
2011-03-02 22:34:34 +00:00
|
|
|
;;
|
2011-03-09 19:22:02 +00:00
|
|
|
# This is how it would look like on gentoo
|
2011-03-03 07:44:03 +00:00
|
|
|
cdist-gentoo)
|
2011-03-09 19:22:02 +00:00
|
|
|
# Same stuff for gentoo
|
2011-03-03 07:44:58 +00:00
|
|
|
__package tree --state installed
|
2011-03-03 07:44:03 +00:00
|
|
|
;;
|
2011-03-09 19:22:02 +00:00
|
|
|
cdist-debian)
|
|
|
|
__package_apt atop --state installed
|
|
|
|
__package apache2 --state deinstalled
|
2011-03-04 01:06:13 +00:00
|
|
|
;;
|
2011-03-09 19:22:02 +00:00
|
|
|
|
|
|
|
# Real machines may be used with their hostname or fqdn,
|
|
|
|
# depending on how you call cdist-deploy-to
|
|
|
|
# machine)
|
|
|
|
# ...
|
|
|
|
# ;;
|
|
|
|
# machine.example.org)
|
|
|
|
# ...
|
|
|
|
# ;;
|
2010-10-31 23:09:30 +00:00
|
|
|
esac
|