Update file if modified on source

21 views
Skip to first unread message

alexa...@gmail.com

unread,
Aug 13, 2020, 6:15:50 AM8/13/20
to help-cfengine

Hello
The file /var/cfengine/inputs/zabbix/my.cnf  on cfengine server was modified. But this file will update only after bootstrap on client side. In boundle zabbix have entry

copy_from => local_dcp("$(this.promise_dirname)/my.cnf"),

How update my.cnf  on client side automaticaly (without bootstrap)?

Nick Anderson

unread,
Aug 13, 2020, 9:47:55 AM8/13/20
to alexa...@gmail.com, help-cfengine

alexa…@gmail.com writes:

Hello The file /var/cfengine/inputs/zabbix/my.cnf on cfengine server was modified. But this file will update only after bootstrap on client side. In boundle zabbix have entry copy_from => local_dcp("$(this.promise_dirname)/my.cnf"), How update my.cnf on client side automaticaly (without bootstrap)?

Hi,

There isn't enough information here to get a clear picture of what you have going on in your policy.

Why does this configuration file only get updated on bootstrap? Is that desired?

My suspicion is that the file is not updated because it does not match def.input_name_patterns. You could either configure def.input_name_patterns, or you could rename your file to match one of the default patterns, for example .txt, .conf or possibly .mustache (especially if you want to have the file rendered dynamically).

https://docs.cfengine.com/docs/3.15/reference-masterfiles-policy-framework.html#files-considered-for-copy-during-policy-updates

– Nick Anderson| Doer of Things | (+1) 785-550-1767 | https://northern.tech

alexa...@gmail.com

unread,
Aug 13, 2020, 3:23:24 PM8/13/20
to help-cfengine
You a right. A file extension was not added to input_name_patterns. Thanks!

четверг, 13 августа 2020 г. в 16:47:55 UTC+3, Nick Anderson:

Nick Anderson

unread,
Aug 17, 2020, 11:18:09 AM8/17/20
to help-cfengine

Great!

Glad that solved it.
Reply all
Reply to author
Forward
0 new messages