Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions content/examples/example-snippets/aborting_execution.cf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ body common control
version => "1.2.3";
}

###########################################
body agent control
{
abortbundleclasses => { "invalid.Hr16" };
}

###########################################
bundle agent testbundle
{
vars:
Expand All @@ -21,7 +19,6 @@ bundle agent testbundle
"any" usebundle => subtest("$(userlist)");
}

###########################################
bundle agent subtest(user)
{
classes:
Expand Down
4 changes: 0 additions & 4 deletions content/examples/example-snippets/acl_file_example.cf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ body common control
bundlesequence => { "acls" };
}

#########################################
bundle agent acls
{
files:
Expand All @@ -12,7 +11,6 @@ bundle agent acls
acl => template;
}

#########################################
body acl template
{
acl_method => "overwrite";
Expand All @@ -23,7 +21,6 @@ body acl template
};
}

#########################################
body acl win
{
acl_method => "overwrite";
Expand All @@ -32,7 +29,6 @@ body acl win
aces => { "user:Administrator:rw", "group:Bad:rwx(Dpo):deny" };
}

#########################################
body depth_search include_base
{
include_basedir => "true";
Expand Down
3 changes: 0 additions & 3 deletions content/examples/example-snippets/acl_generic_example.cf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ body common control
bundlesequence => { "acls" };
}

#########################################
bundle agent acls
{
files:
Expand All @@ -12,14 +11,12 @@ bundle agent acls
acl => test;
}

#########################################
body acl test
{
acl_type => "generic";
aces => { "user:bob:rwx", "group:staff:rx", "all:r" };
}

#########################################
body depth_search include_base
{
include_basedir => "true";
Expand Down
3 changes: 0 additions & 3 deletions content/examples/example-snippets/acl_secret_example.cf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ body common control
bundlesequence => { "acls" };
}

#########################################
bundle agent acls
{
files:
Expand All @@ -14,14 +13,12 @@ bundle agent acls
comment => "Secure the secret directory from unauthorized access";
}

#########################################
body acl win
{
acl_method => "overwrite";
aces => { "user:Administrator:rwx" };
}

#########################################
body depth_search include_base
{
include_basedir => "true";
Expand Down
3 changes: 0 additions & 3 deletions content/examples/example-snippets/active_directory_example.cf
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#########################################################################
# active_directory.cf - Extract Data From Windows Domain Controllers
#
# NOTE: Since we don't supply any credentials in this policy file,
# the Domain Controller must allow anonymous bind. Also,
# the user "NT AUTHORITY\ANONYMOUS LOGON" must be granted access
# to the resources we want to read.
#
#########################################################################
bundle agent active_directory
{
vars:
Expand Down
1 change: 0 additions & 1 deletion content/examples/example-snippets/add_lines_to_a_file.cf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ body common control
bundlesequence => { "insert" };
}

#######################################################
bundle agent insert
{
vars:
Expand Down
1 change: 0 additions & 1 deletion content/examples/example-snippets/add_lines_to_a_file_1.cf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ body common control
bundlesequence => { "insert" };
}

#######################################################
bundle agent insert
{
vars:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ body common control
bundlesequence => { "packages" };
}

#############################################
bundle agent packages
{
vars:
Expand Down
4 changes: 0 additions & 4 deletions content/examples/example-snippets/all_hosts_the_same.cf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ body common control
bundlesequence => { "central" };
}

############################################
bundle agent central
{
vars:
Expand All @@ -27,9 +26,7 @@ bundle agent central
# Add more promises below ...
}

#########################################################
# Server config
#########################################################
body server control
{
allowconnects => { "127.0.0.1", "::1", "10.20.30.0/24" };
Expand All @@ -38,7 +35,6 @@ body server control
# allowusers
}

#########################################################
bundle server my_access_rules()
{
access:
Expand Down
4 changes: 0 additions & 4 deletions content/examples/example-snippets/application_baseline.cf
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#########################################################################
#
# app_baseline.cf - Verify Existence of Applications
#
# NOTE: Sometimes applications are not correctly installed even
# though the native package manager reports them to be.
# CFEngine can check for application-specific configuration
# and act upon or report any anomalies.
#
#########################################################################
bundle agent app_baseline
{
methods:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
######################################################################
#
# File editing - back reference
#
######################################################################
body common control
{
version => "1.2.3";
bundlesequence => { "testbundle" };
}

########################################################
bundle agent testbundle
{
files:
Expand All @@ -23,7 +18,6 @@ bundle agent testbundle
# edit_line => myedit("second $(match.1)");
}

########################################################
bundle edit_line myedit(parameter)
{
vars:
Expand Down
1 change: 0 additions & 1 deletion content/examples/example-snippets/change_detection.cf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ body common control
inputs => { "cfengine_stdlib.cf" };
}

########################################################
bundle agent testbundle
{
files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ body common control
bundlesequence => { "example" };
}

###########################################################
body contain cd(dir)
{
chdir => "${dir}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ body common control
bundlesequence => { "example" };
}

###########################################################
bundle agent example
{
vars:
Expand Down
1 change: 0 additions & 1 deletion content/examples/example-snippets/class_match_example.cf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ body common control
bundlesequence => { "example" };
}

###########################################################
bundle agent example
{
classes:
Expand Down
13 changes: 0 additions & 13 deletions content/examples/example-snippets/client-server_example.cf
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
########################################################
#
# Simple test copy from server connection to cfServer
#
########################################################
#
# run this as follows:
#
# cf-serverd -f runtest_1.cf [-v]
# cf-agent -f runtest_2.cf
#
# Notice that the same file configures all parts of cfengine
########################################################
body common control
{
bundlesequence => { "testbundle" };
version => "1.2.3";
#fips_mode => "true";
}

########################################################
bundle agent testbundle
{
files:
Expand All @@ -41,19 +35,16 @@ bundle agent testbundle
"Files were copied..";
}

#########################################################
body perms system
{
mode => "0644";
}

#########################################################
body depth_search recurse(d)
{
depth => "$(d)";
}

#########################################################
body copy_from mycopy(from, server)
{
source => "$(from)";
Expand All @@ -69,16 +60,13 @@ body copy_from mycopy(from, server)
trustkey => "true";
}

#########################################################
body classes satisfied(x)
{
promise_repaired => { "$(x)" };
persist_time => "0";
}

#########################################################
# Server config
#########################################################
body server control
{
allowconnects => { "127.0.0.1", "::1" };
Expand All @@ -87,7 +75,6 @@ body server control
# allowusers
}

#########################################################
bundle server my_access_rules()
{
access:
Expand Down
Loading
Loading