forked from Normation/rudder
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gpoblon
committed
Jul 9, 2020
1 parent
745f8a4
commit dd853a7
Showing
7 changed files
with
188 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,57 @@ | ||
{ | ||
"bundle_name": "CIS_redhat7___Enable_Service", | ||
"description": "test", | ||
"name": "CIS redhat7 - Enable Service", | ||
"version": "1.0", | ||
"parameter": [ | ||
"bundle_name": "CIS_redhat7___Enable_Service", | ||
"description": "test", | ||
"name": "CIS redhat7 - Enable Service", | ||
"version": "1.0", | ||
"parameter": [ | ||
{ | ||
"id": "981a5b9d-b062-4011-8dff-df1810cb2fe6", | ||
"name": "service", | ||
"description": "" | ||
} | ||
], | ||
"category": "CIS_redhat7", | ||
"method_calls": [ | ||
{ | ||
"parameters": [ | ||
{ | ||
"name": "condition_prefix", | ||
"value": "skip_item_${report_data.canonified_directive_id}", | ||
"$errors": [] | ||
}, | ||
{ | ||
"id": "981a5b9d-b062-4011-8dff-df1810cb2fe6", | ||
"name": "service", | ||
"description": "" | ||
"name": "variable_name", | ||
"value": "node.properties[skip][${report_data.directive_id}]", | ||
"$errors": [] | ||
} | ||
], | ||
"category": "CIS_redhat7", | ||
"method_calls": [ | ||
{ | ||
"parameters": [ | ||
{ | ||
"name": "condition_prefix", | ||
"value": "skip_item_${report_data.canonified_directive_id}", | ||
"$errors": [] | ||
}, | ||
{ | ||
"name": "variable_name", | ||
"value": "node.properties[skip][${report_data.directive_id}]", | ||
"$errors": [] | ||
} | ||
], | ||
"class_context": "any", | ||
"method_name": "condition_from_variable_existence", | ||
"component": "condition_from_variable_existence" | ||
}, | ||
"class_context": "any", | ||
"method_name": "condition_from_variable_existence", | ||
"component": "condition_from_variable_existence" | ||
}, | ||
{ | ||
"parameters": [ | ||
{ | ||
"parameters": [ | ||
{ | ||
"name": "service_name", | ||
"value": "${service}", | ||
"$errors": [] | ||
} | ||
], | ||
"class_context": "any.(skip_item_${report_data.canonified_directive_id}_ok)", | ||
"method_name": "service_enabled", | ||
"component": "service_enabled" | ||
}, | ||
"name": "service_name", | ||
"value": "${service}", | ||
"$errors": [] | ||
} | ||
], | ||
"class_context": "any.(skip_item_${report_data.canonified_directive_id}_false)", | ||
"method_name": "service_enabled", | ||
"component": "service_enabled" | ||
}, | ||
{ | ||
"parameters": [ | ||
{ | ||
"parameters": [ | ||
{ | ||
"name": "service_name", | ||
"value": "${service}", | ||
"$errors": [] | ||
} | ||
], | ||
"class_context": "any.(skip_item_${report_data.canonified_directive_id}_not_ok)", | ||
"method_name": "service_started", | ||
"component": "service_started" | ||
"name": "service_name", | ||
"value": "${service}", | ||
"$errors": [] | ||
} | ||
] | ||
], | ||
"class_context": "any.(skip_item_${report_data.canonified_directive_id}_false)", | ||
"method_name": "service_started", | ||
"component": "service_started" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# generated by rudder-lang | ||
# @name CIS redhat7 - Enable Service | ||
# @description test | ||
# @version 1.0 | ||
# @parameter { "name": "service", "id": "981a5b9d-b062-4011-8dff-df1810cb2fe6", "constraints": "" } | ||
|
||
bundle agent CIS_redhat7___Enable_Service_technique(service) | ||
{ | ||
vars: | ||
"resources_dir" string => "${this.promise_dirname}/resources"; | ||
methods: | ||
"condition_from_variable_existence_${report_data.directive_id}_0" usebundle => _method_reporting_context("condition_from_variable_existence", "skip_item_"); | ||
"condition_from_variable_existence_${report_data.directive_id}_0" usebundle => condition_from_variable_existence("skip_item_", "${report_data.canonified_directive_id}"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file has been generated with rltranslate | ||
@format=0 | ||
@name="Configure NTP" | ||
@description="test" | ||
@version="1.0" | ||
@parameters= [ | ||
] | ||
|
||
resource Configure_NTP() | ||
Configure_NTP state technique() { | ||
@component = "Package present" | ||
package("ntp").present("","","") as package_present_ntp | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# generated by rudder-lang | ||
# @name NTP Technique | ||
# @description Configure the NTP | ||
# @version 1.1 | ||
|
||
bundle agent NTP_Technique_technique | ||
{ | ||
vars: | ||
"resources_dir" string => "${this.promise_dirname}/resources"; | ||
methods: | ||
"Package install_${report_data.directive_id}_0" usebundle => _method_reporting_context("Package install", "ntp"); | ||
"Package install_${report_data.directive_id}_0" usebundle => package_install("ntp"); | ||
"File ensure lines present_${report_data.directive_id}_1" usebundle => _method_reporting_context("File ensure lines present", "/etc/ntp.conf"); | ||
"File ensure lines present_${report_data.directive_id}_1" usebundle => file_ensure_lines_present("/etc/ntp.conf", "server pool.ntp.org"); | ||
"Service restart_${report_data.directive_id}_2" usebundle => _method_reporting_context("Service restart", "ntp"), | ||
if => concat("file_ensure_lines_present__etc_ntp_conf1_outcome_repaired"); | ||
"Service restart_${report_data.directive_id}_2" usebundle => service_restart("ntp"), | ||
if => concat("file_ensure_lines_present__etc_ntp_conf1_outcome_repaired"); | ||
} |