You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.7 KiB
66 lines
1.7 KiB
14 years ago
|
#
|
||
|
# This is a sample manifest, but used in real world
|
||
|
#
|
||
|
|
||
14 years ago
|
# This is debug and should not be in a production environment
|
||
14 years ago
|
# echo "We could access other manifests in $__manifest"
|
||
14 years ago
|
|
||
14 years ago
|
# Every machine becomes a marker, so sysadmins know that automatic
|
||
|
# configurations are happening
|
||
14 years ago
|
__file /etc/cdist-configured
|
||
14 years ago
|
|
||
14 years ago
|
case "$__target_host" in
|
||
14 years ago
|
# Everybody has this
|
||
14 years ago
|
localhost)
|
||
14 years ago
|
require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \
|
||
|
--source /etc/cdist-configured --type symbolic
|
||
|
require="__directory/tmp/cdist-test-dir" __file /tmp/cdist-test-dir/test-file \
|
||
|
--mode 0750 --owner nobody --group root
|
||
14 years ago
|
__directory /tmp/cdist-test-dir --mode 4777
|
||
14 years ago
|
|
||
|
require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \
|
||
|
__file /tmp/cdist-another-testfile
|
||
|
|
||
14 years ago
|
;;
|
||
14 years ago
|
|
||
14 years ago
|
#
|
||
|
# Examples using different types
|
||
|
#
|
||
|
|
||
14 years ago
|
# Alias in /etc/hosts for localhost
|
||
|
cdist-archlinux)
|
||
14 years ago
|
# This is the specific package type for pacman
|
||
14 years ago
|
__package_pacman zsh --state installed
|
||
14 years ago
|
|
||
|
# The __package type autoselect the right type based on the os
|
||
|
__package vim --state installed
|
||
14 years ago
|
|
||
|
# If the type is a singleton, it does not take an object id
|
||
|
__issue
|
||
14 years ago
|
;;
|
||
14 years ago
|
# This is how it would look like on gentoo
|
||
14 years ago
|
cdist-gentoo)
|
||
14 years ago
|
# Same stuff for gentoo
|
||
14 years ago
|
__package tree --state installed
|
||
14 years ago
|
;;
|
||
14 years ago
|
|
||
14 years ago
|
cdist-debian)
|
||
|
__package_apt atop --state installed
|
||
|
__package apache2 --state deinstalled
|
||
14 years ago
|
;;
|
||
14 years ago
|
|
||
14 years ago
|
cdist-redhat)
|
||
|
__issue
|
||
|
__motd
|
||
|
;;
|
||
|
|
||
14 years ago
|
# Real machines may be used with their hostname or fqdn,
|
||
|
# depending on how you call cdist-deploy-to
|
||
|
# machine)
|
||
|
# ...
|
||
|
# ;;
|
||
|
# machine.example.org)
|
||
|
# ...
|
||
|
# ;;
|
||
14 years ago
|
esac
|