####comm
body common control{ inputs => { "/var/cfengine/inputs/libraries/cfengine_stdlib.cf" }; bundlesequence => { "configfiles" };}
bundle agent configfiles{ vars: # Files to edit "files[sysctl]" string => "/root/sysctl.conf"; # Sysctl variables to set "sysctl[net.ipv4.tcp_syncookies]" string => "1"; "sysctl[net.ipv4.conf.all.accept_source_route]" string => "0"; "sysctl[net.ipv4.conf.all.accept_redirects]" string => "0"; "sysctl[net.ipv4.conf.all.rp_filter]" string => "1"; "sysctl[net.ipv4.conf.all.log_martians]" string => "1"; methods: "sysctl" usebundle => edit_sysctl, comment => "Configure $(files[sysctl])";}bundle agent edit_sysctl{ files: "$(configfiles.files[sysctl])" handle => "edit_sysctl", comment => "Make sure sysctl.conf contains desired configuration", create => "true", edit_line => set_variable_values("configfiles.sysctl"), classes => if_repaired("sysctl_modified");
commands: sysctl_modified.!no_restarts:: "/sbin/ifconfig -a" handle => "reload_sysctl", comment => "Make sure new sysctl settings are loaded"; reports: cfengine_3:: "bundle agent host_groups_new D O N E";}bundle agent host_groups_new{classes: "11.cc.lan" or => {"ipv4_192_168_16_11"};methods: 11.cc.lan:: "configs_policies/sysctl-edit.cf" usebundle => "configfiles";}body common control{inputs => { "/var/cfengine/inputs/libraries/cfengine_stdlib.cf" };bundlesequence => { "configfiles" };}cf-promises -f /root/promises_cfengine/promises.cf /root/promises_cfengine/promises.cf:9:0: error: Duplicate definition of body control with type common/root/promises_cfengine/configs_policies/sysctl-edit.cf:3:0: error: Duplicate definition of body control with type commoncf-promises -f /root/promises_cfengine/configs_policies/sysctl-edit.cf 2014-02-10T17:23:14+0200 error: No such FnCall "if_repaired()" in promise @ /root/promises_cfengine/configs_policies/sysctl-edit.cf near line 212014-02-10T17:23:14+0200 error: No such FnCall "if_repaired()" in promise @ /root/promises_cfengine/configs_policies/sysctl-edit.cf near line 21--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/groups/opt_out.
Thank very much to all
Thank very much to all
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.
- CFEngine Primer https://digitalelf.net/cf-primer
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.
thak's my problem was solvent!!! excelent thanks for your time and answer... (y) i'm so grateful!!!!
Good attention to detail, Chris. :)It's meant to show that the workflow is:- from masterfiles on the hub to "inputs" on the hub and to "inputs" on the clients"- definitely not from "inputs" on the hub to "inputs" on the clients".Brian, cold you clarify that, please? :)
So just to sum, the policy won't trickle out of the hub to the hosts until the hub has validated it and installed it in it's own inputs, right? The way you ship CFEngine?
--
files:
am_policy_hub|validated_updates_ready:: # policy hub should always put masterfiles in inputs in order to check new policy"$(inputs_dir)"comment => "Copy policy updates from master source on policy server if a new validation was acquired",handle => "cfe_internal_update_policy_files_inputs_dir",copy_from => u_rcp("$(master_location)", @(update_def.policy_servers)),depth_search => u_recurse("inf"),file_select => u_input_files,action => u_immediate;
| $(master_location) is defined as follows:
vars: !windows:: | |
| "master_location" string => "$(sys.masterdir)", | |
| comment => "The master CFEngine policy directory on the policy host", | |
| handle => "cfe_internal_update_policy_vars_master_location"; |
Circling back on this,Here's the update policy for !am_policy_hub, which updates from $(input_dir), which has been defined as $(sys.inputdir).Whereas am_policy_hub updates from $(master_location)/., which for non-windows systems is defined as $(sys.masterdir).