ungleich-learning-circle/sami/my-org-files/cdist.org/cdist#5-messsaging

16 lines
888 B
Text
Raw Normal View History

2020-05-12 10:12:50 +00:00
cdist #5: Generating Code & Exploring
* Understanding how to generate code and when to use it
** define gencode-remote script: ~/.cdist/type/__nginx_site. After manifest is applied it should restart services so configuration is active. Our gencode-remote looks like echo "service nginx restart"
* Modify the previously created type *__my_nginx_site*
** We modify the previously created type so that the gencode-remote script reacts accordingly
- echo "if_configurationfile_changes" >> "$__messages_out"
* Read about cdist messaging
** cdist has a simple but powerful way of allowing communication between the initial manifest and types as well as types and types.
* What is the difference between gencode-local and gencode-remote?
** gencode-remote used to generate code to be executed on the target host
** gencode-local used to generate code to be executed on the source host