Table of Contents
This cdist type allows you to create files, remove files and set file attributes on the target.
# Create /etc/cdist-configured as an empty file __file /etc/cdist-configured # The same thing __file /etc/cdist-configured --state present # Delete existing file __file /etc/cdist-configured --state absent # Use __file from another type __file /etc/issue --source "$__type/files/archlinux" --state present # Supply some more settings __file /etc/shadow --source "$__type/files/shadow" \ --owner root --group shadow --mode 0640 \ --state present # Provide a default file, but let the user change it __file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \ --state exists \ --owner frodo --mode 0600 # Take file content from stdin __file /tmp/whatever --owner root --group root --mode 644 --source - << DONE Here goes the content for /tmp/whatever DONE