From b6a010450efd9c726ce72fe6896dc4899244fcca Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Wed, 22 Jan 2025 12:08:56 +0300 Subject: [PATCH 1/6] Added classic_policy_set parameter to the Create project API endpoint Ticket: ENT-12436 Signed-off-by: Ihor Aleksandrychiev --- content/api/enterprise-api-ref/build-api.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/api/enterprise-api-ref/build-api.markdown b/content/api/enterprise-api-ref/build-api.markdown index 4b8b51f27..981aeb8ba 100644 --- a/content/api/enterprise-api-ref/build-api.markdown +++ b/content/api/enterprise-api-ref/build-api.markdown @@ -40,6 +40,8 @@ A project is a set of CFEngine Build modules and custom files/json/policy files. - **sshKeyId** _(integer)_ Generated SSH private key ID by [SSH keys API][SSH keys API#Generate SSH key] for authentication to the repository. Required when authentication type is `private_key` and `sshPrivateKey` is not set. +- **classic_policy_set** _(boolean)_ + The flag that indicates whether the build project is classic policy set (not cfbs) or not. **Note:** the SSH key is expected to be in openssh(rfc4716) format as generated by [SSH Keys API][SSH keys API#Generate SSH key] or a command line like: From 3e4c005ec466b4f6c8532a881a05201d8e627d51 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 6 May 2026 13:41:45 -0500 Subject: [PATCH 2/6] Fixed syntax error in example_updating_from_central_hub --- .../promise-patterns/example_updating_from_central_hub.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/examples/example-snippets/promise-patterns/example_updating_from_central_hub.markdown b/content/examples/example-snippets/promise-patterns/example_updating_from_central_hub.markdown index 3bb939684..5536198ce 100644 --- a/content/examples/example-snippets/promise-patterns/example_updating_from_central_hub.markdown +++ b/content/examples/example-snippets/promise-patterns/example_updating_from_central_hub.markdown @@ -21,7 +21,7 @@ vars: "master_location" string => "/var/cfengine/masterfiles"; - "policy_server" string => "10.20.30.123"; + "policy_server" string => "10.20.30.123", comment => "IP address to locate your policy host."; files: From 1a67bff8c01b79a154ea7ca29ad1418369e3df52 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 6 May 2026 14:21:01 -0500 Subject: [PATCH 3/6] Fixed syntax error in policy-style examples --- .../examples/tutorials/policy-writing/policy-style.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/examples/tutorials/policy-writing/policy-style.markdown b/content/examples/tutorials/policy-writing/policy-style.markdown index f3a7c4c06..61686489f 100644 --- a/content/examples/tutorials/policy-writing/policy-style.markdown +++ b/content/examples/tutorials/policy-writing/policy-style.markdown @@ -58,7 +58,7 @@ bundle agent main packages: "ssh" - policy => "present"; + policy => "present", package_module => apt_get; services: @@ -95,7 +95,7 @@ bundle agent main { packages: "ssh" - policy => "present"; + policy => "present", package_module => apt_get; vars: From b4e5f8b85a66a6511b1309874373456848b4c99d Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 6 May 2026 14:21:10 -0500 Subject: [PATCH 4/6] Fixed invalid function calls in macros examples --- content/reference/macros.markdown | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/content/reference/macros.markdown b/content/reference/macros.markdown index 07cfd5d64..020012a99 100644 --- a/content/reference/macros.markdown +++ b/content/reference/macros.markdown @@ -29,8 +29,8 @@ The contained policy is only included if the version is greater than or equal to bundle agent extractor { @if minimum_version(3.8) -# the function `new_function_3_8()` was introduced in 3.8 -vars: "container" data => new_function_3_8(); +# This block is only parsed on CFEngine 3.8 or later +vars: "container" data => parsejson('{}'); @endif } ``` @@ -49,7 +49,7 @@ bundle agent extractor @if maximum_version(3.15) # This policy will only be parsed on versions 3.15 and earlier vars: - "container" data => old_function_3_15(); + "container" data => parsejson('{}'); @endif } ``` @@ -70,7 +70,7 @@ bundle agent extractor @if at_version(3.15) # This policy will only be parsed on 3.15 clients vars: - "container" data => old_function_3_15(); + "container" data => parsejson('{}'); @endif } ``` @@ -91,7 +91,7 @@ bundle agent extractor @if between_versions(3.12, 3.15) # Policy specific to 3.12, 3.13, 3.14, 3.15 vars: - "container" data => workaround_3_12_3_15(); + "container" data => parsejson('{}'); @endif } ``` @@ -113,7 +113,7 @@ bundle agent extractor # Policy to work around issue which was fixed in 3.15 vars: "container" - data => workaround_pre_3_15(); + data => parsejson('{}'); @endif } ``` @@ -135,7 +135,7 @@ bundle agent extractor # This policy is only parsed on 3.16+ vars: "container" - data => not_neded_on_3_15(); + data => parsejson('{}'); @endif } ``` @@ -159,12 +159,12 @@ bundle agent extractor # Implementation for 3.16+ vars: "container" - data => classfiltercsv(); + data => classfiltercsv("/tmp/data.csv", "true", "any"); @else # Implementation for versions before 3.16 vars: "container" - data => readcsv(); + data => readcsv("/tmp/data.csv"); @endif } ``` @@ -182,7 +182,7 @@ bundle agent extractor { @if feature(xml) # the yaml library may not be compiled in - vars: "container" data => parseyaml(); + vars: "container" data => parseyaml("---"); @endif } ``` From a01ac961bae9716f735b0b6e475b582377bc047e Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 6 May 2026 14:21:18 -0500 Subject: [PATCH 5/6] Fixed syntax error in this.service_policy example --- content/reference/special-variables/this.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/reference/special-variables/this.markdown b/content/reference/special-variables/this.markdown index 15e458174..fda83ade8 100644 --- a/content/reference/special-variables/this.markdown +++ b/content/reference/special-variables/this.markdown @@ -178,7 +178,7 @@ bundle agent example services: "www" - service_policy => "start"; + service_policy => "start", service_method => non_standard_services; } body service_method non_standard_services From 2d08cb6e86dd4f136c1911ecba14e40db0fd4fee Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 6 May 2026 14:21:27 -0500 Subject: [PATCH 6/6] Fixed invalid 'use' attribute in methods example --- content/resources/additional-topics/hierarchies.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/resources/additional-topics/hierarchies.markdown b/content/resources/additional-topics/hierarchies.markdown index 078374cfb..1a607e7c8 100644 --- a/content/resources/additional-topics/hierarchies.markdown +++ b/content/resources/additional-topics/hierarchies.markdown @@ -295,7 +295,7 @@ bundle agent child_bundle { methods: "extend_method" - use => base_bundle(parameter1,parameter2); + usebundle => base_bundle(parameter1,parameter2); } ```