# Every machine becomes a marker, so sysadmins know that automatic
# configurations are happening
# __file /etc/cdist-configured
# __motd

case "$__target_host" in
    localhost)

      __directory /tmp/cdist/test/23 --parents

      exit 0

      __line /tmp/cdist-testfile --line "test123" --state present
      #__line /tmp/cdist-testfile2 --line "test123" --state absent
      __line /tmp/cdist-testfile2 --regex "test.*" --state absent
      #__line /tmp/cdist-testfile2 --line "test123" --regex "test.*" --state absent
      __addifnosuchline /tmp/cdist-welcome --line "Welcome to cdist 2.1"
      __removeline  /tmp/cdist-welcome --line "Welcome to cdist 2.0"

      exit 0

      __link /tmp/cdist-testfile --source /etc/cdist-configured  --type symbolic

      __package zsh --state present
      #__package zsh --state removed 
      # __package python3 --state installed
      __directory /tmp/foobar
      require="__directory//tmp/foobar" __file /tmp/foobar/baz
      require="__directory//tmp/foobar" __file /tmp/foobar/bar

      __directory /tmp/foo/bar --parents yes --owner nico --group postdrop --recursive yes

      #__process /usr/lib/postfix/master --start "/etc/rc.d/postfix start" --state running


      # --state tests
      __directory /tmp/cdist --state present
      __directory /tmp/nichtcdista --state absent
      require="__directory/tmp/cdist" __link /tmp/cdist/foo --source /tmp/cdist/bar --state present --type symbolic
      require="__directory/tmp/cdist" __link /tmp/cdist/zoo --source /tmp/cdist/moo --state absent --type symbolic
      require="__directory/tmp/cdist" __file /tmp/cdist/binda --state present
      require="__directory/tmp/cdist" __file /tmp/cdist/nichtda --state absent

#      __process cups --start "/etc/rc.d/cups start" --state running --name "/usr/sbin/cupsd -C /etc/cups/cupsd.conf"
#
#      __user test1
#      __user test2 --gid root
#      __user test3 --gid 1000 --home /tmp/foo
#      __group test5
#      __group test6 --gid 12000
   ;;

   v-net.ch)
      #__package_yum zsh --state installed

   ;;
   brett)
      __package_yum zsh --state installed

   ;;
   sgv-default-01)
      __package_apt postfix --preseed /home/users/nico/ethz/vcs/puppet/modules/postfix/files/seeds --state installed
   ;;
esac
