Editing
Bundle agent update
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Dynamic CCFEngine3 requires the update bundle to pull information specific to the domain, host and role into the input_webhuis branch on the node. The node should only have the required bundles and therefore purging of obsolete files is set. <pre> ############################################################################### # # Webhuis agent update, applicable to all hosts # # Copyright (C) 2008 Martin Simons, Webhuis. Renkum The Netherlands # This source code is licensed under the GNU General Public License, Version 2. # See http://webhuis.nl/GPL-license for more details. # ############################################################################### bundle agent update { files: "$(sys.workdir)/inputs" comment => "Copy policy updates from master source on policy server if a new validation was acquired", handle => "update_files_inputs_dir", copy_from => u_secure_cp("${g.master_location}","${sys.policy_hub}"), depth_search => u_recurse("inf"), file_select => u_inputfiles, action => u_immediate; "$(sys.workdir)/inputs-webhuis/domain/${sys.domain}.cf" comment => "Copy domain policy updates from master source on policy server if a new validation was acquired", handle => "update_files_inputs_domain_dir", copy_from => u_secure_cp("${g.master_domain}/${sys.domain}/${sys.domain}.cf","${sys.policy_hub}"), file_select => u_inputdomain, action => u_immediate; "$(sys.workdir)/inputs-webhuis/host/${sys.uqhost}.cf" comment => "Copy host policy updates from master source on policy server if a new validation was acquired", handle => "update_files_inputs_host_dir", copy_from => u_secure_cp("${g.master_domain}/${sys.domain}/${sys.uqhost}.cf","${sys.policy_hub}"), file_select => u_inputhost, action => u_immediate; "$(sys.workdir)/inputs-webhuis/role/${role.role}.cf" comment => "Copy roles updates from master source on policy server if a new validation was acquired", handle => "update_files_inputs_role_dir", copy_from => u_secure_cp("${g.master_roles}/${role.role}.cf","${sys.policy_hub}"), file_select => u_inputfiles, action => u_immediate; "$(sys.workdir)/inputs-webhuis/components/${${g.role}.input}" comment => "Copy components updates from master source on policy server if a new validation was acquired", handle => "update_files_inputs_components_dir", copy_from => u_secure_cp("/var/cfengine/webhuis/components/${${g.role}.input}","${sys.policy_hub}"), file_select => u_inputfiles, action => u_immediate; } ######################################################### body copy_from u_secure_cp(from,server) { source => "$(from)"; servers => { "$(sys.policy_hub)" }; trustkey => "false"; encrypt => "true"; purge => "true"; } ######################################################### body action u_immediate { ifelapsed => "0"; } ######################################################### body depth_search u_recurse(d) { depth => "$(d)"; exclude_dirs => { "\.svn", "\.git" }; } body file_select u_inputfiles { leaf_name => { ".*.cf",".*.dat",".*.txt" }; file_result => "leaf_name"; } body file_select u_inputdomain { leaf_name => { ".*.cf",".*.dat",".*.txt" }; file_result => "leaf_name"; } body file_select u_inputhost { leaf_name => { ".*.cf",".*.dat",".*.txt" }; file_result => "leaf_name"; } </pre> <hr> Return to: [[Dynamic_Cfengine3]]
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information