** CFEngine BOOTSTRAP probe initiated @@@ @@@ CFEngine @ @@@ @ CFEngine Core 3.4.1 @ @@@ @ @ @@@ @ @ @ @@@ @ @ @ @ @ @ Copyright (C) CFEngine AS 2008-2012 See Licensing at http://cfengine.com/3rdpartylicenses -> This host is: policyhub01.local -> Operating System Type is linux -> Operating System Release is 3.6.10-vs2.3.4.6 -> Architecture = x86_64 -> Internal soft-class is linux -> No policy failsafe discovered, assume temporary bootstrap vector -> No previous policy has been cached on this host -> Assuming the policy distribution point at: 198.51.100.10:/var/cfengine/masterfiles -> Attempting to initiate promised autonomous services... ** This host recognizes itself as a CFEngine Policy Hub, with policy distribution and knowledge base. -> The system is now converging. Full initialisation and self-analysis could take up to 30 minutes R: This host assumes the role of policy distribution host R: -> Updated local policy from policy server R: -> Started the server R: -> Started the scheduler -> Bootstrap to 198.51.100.10 completed successfully
-> No policy failsafe discovered, assume temporary bootstrap vector -> No previous policy has been cached on this host -> Assuming the policy distribution point at: 198.51.100.10:/var/cfengine/masterfiles -> Attempting to initiate promised autonomous services... Challenge response from server 198.51.100.10/198.51.100.10 was incorrect! !! Authentication dialogue with 198.51.100.10 failed R: This autonomous node assumes the role of voluntary client R: !! Failed to pull policy from policy server R: !! Did not start the scheduler !! Bootstrapping failed, no input file at /var/cfengine/inputs/promises.cf after bootstrap .
"acl" slist => { "$(sys.policy_hub)", "203.0.113.101/32", },
** CFEngine BOOTSTRAP probe initiated @@@ @@@ CFEngine @ @@@ @ CFEngine Core 3.4.1 @ @@@ @ @ @@@ @ @ @ @@@ @ @ @ @ @ @ Copyright (C) CFEngine AS 2008-2012 See Licensing at http://cfengine.com/3rdpartylicenses -> This host is: srv01.local -> Operating System Type is linux -> Operating System Release is 3.6.10-vs2.3.4.6 -> Architecture = x86_64 -> Internal soft-class is linux -> An existing policy was cached on this host in /var/cfengine/inputs -> Assuming the policy distribution point at: 198.51.100.10:/var/cfengine/masterfiles -> Attempting to initiate promised autonomous services... R: This autonomous node assumes the role of voluntary client -> Bootstrap to 198.51.100.10 completed successfully
bundle agent config_web_srv { vars: "package_list" slist => { "nginx" }; packages: "${package_list}" package_policy => "add", package_method => generic; processes: "nginx" restart_class => "start_nginx"; commands: "/etc/init.d/nginx restart" ifvarclass => canonify("start_nginx"); }
bundle agent install_base_pkg { vars: "package_list" slist => { "vim", "mc" }; packages: "${package_list}" package_policy => "add", package_method => generic; files: linux:: "/etc/motd" edit_line => insert_lines("This host is managed by cfengine3!"); }
inputs => { # Global common bundles "def.cf", # Control body for all agents "controls/cf_agent.cf", "controls/cf_execd.cf", "controls/cf_monitord.cf", "controls/cf_report.cf", "controls/cf_runagent.cf", "controls/cf_serverd.cf", # COPBL/Custom libraries "libraries/cfengine_stdlib.cf", # Design Center # MARKER FOR CF-SKETCH INPUT INSERTION "cf-sketch-runfile.cf", # User services from here "services/init_msg.cf", # our policies "config_web_srv.cf", "install_base_pkg.cf", };
bundle agent config { classes: "web_srv" or => { classmatch("web.*"), "srv01_local", "web3_example_com" }; methods: web_srv:: "config_web_srv" usebundle => "config_web_srv"; any:: "install_everywhere" usebundle => "install_base_pkg"; reports: cfengine_3:: "bundle agent config DONE"; }
bundlesequence => { # Common bundles first for best practice "def", # Design Center "cfsketch_run", # Agent buddles from here "main", # Our ccustomisation "config", };
Hard classes = { 203_0_113_101 2_cpus 64_bit Afternoon Day6 GMT_Hr17 Hr17 Hr17_Q2 January Lcycle_0 Min20_25 Min21 PK_MD5_877dfa1640c3c49a2065ce220a3b821f Q2 Sunday Yr2013 agent any cfengine cfengine_3 cfengine_3_4 cfengine_3_4_1 cfengine_in_high community_edition compiled_on_linux_gnu cpu0_normal cpu1_normal cpu_normal debian debian_7 debian_7_0 diskfree_high_normal entropy_misc_in_low entropy_misc_out_low entropy_postgresql_in_low entropy_postgresql_out_low have_aptitude ipv4_203 ipv4_203_0 ipv4_203_0_113 ipv4_203_0_113_101 linux linux_3_6_10_vs2_3_4_6 linux_x86_64 linux_x86_64_3_6_10_vs2_3_4_6 linux_x86_64_3_6_10_vs2_3_4_6__1_SMP_Mon_Dec_17_03_23_11_UTC_2012 local mac_00_25_64_3b_97_cb messages_high_ldt messages_high_normal net_iface_br0 opt_dry_run otherprocs_low rootprocs_high rootprocs_high_ldt srv01 srv01_local syslog_high_ldt syslog_high_normal users_low verbose_mode www_in_low x86_64 }
Source: https://habr.com/ru/post/164923/
All Articles