---
name: "cdist-type__config_file"
section: "7"
platform: "linux"
package: "cdist"
version: "7.0.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cdist-type__config_file"
---

# cdist-type\_\_config\_file(7)

\_Manages config files

## NAME

cdist-type\_\_config\_file - \_Manages config files

## DESCRIPTION

Deploy config files using the file type. Run the given code if the files changes.

## REQUIRED PARAMETERS

None.

## OPTIONAL PARAMETERS

- **group**

  see cdist-type\_\_file

- **mode**

  see cdist-type\_\_file

- **onchange**

  the code to run if the file changes

- **owner**

  see cdist-type\_\_file

- **source**

  Path to the config file. If source is '-' (dash), take what was written to stdin as the config file content.

- **state**

  see cdist-type\_\_file

## EXAMPLES

```
__config_file /etc/consul/conf.d/watch_foo.json \
   --owner root --group consul --mode 640 \
   --source "$__type/files/watch_foo.json" \
   --state present \
   --onchange 'service consul status >/dev/null && service consul reload || true'
```

## SEE ALSO

[**cdist-type\_\_file**(7)](/cdist-type__file/7.md)

## AUTHORS

Steven Armstrong \<*steven-cdist--@--armstrong.cc*\>

## COPYING

Copyright (C) 2015 Steven Armstrong. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

## COPYRIGHT

ungleich GmbH 2021
