Skip to content

Commit

Permalink
Refs #5446: Rewrite techniques to use only ${}
Browse files Browse the repository at this point in the history
  • Loading branch information
peckpeck committed Sep 10, 2014
1 parent 4a6a9af commit 6fe35ee
Show file tree
Hide file tree
Showing 11 changed files with 256 additions and 256 deletions.
2 changes: 1 addition & 1 deletion techniques/applications/apacheReverseProxy/2.0/bodies.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bundle edit_line insert_proxy_entries(entries)
insert_lines:

"<IfModule mod_proxy.c>
$(entries)</IfModule>";
${entries}</IfModule>";

}

2 changes: 1 addition & 1 deletion techniques/applications/apacheReverseProxy/2.0/main.st
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bundle agent rudder_reverse_proxy_apache
string => "&APACHE_REVERSE_PROXY_INSTALL&";

"rudder_reverse_proxy_params[proxies]"
string => "&APACHE_REVERSE_PROXY_URL_SRC,APACHE_REVERSE_PROXY_URL_DST,APACHE_REVERSE_PROXY_TIMEOUT:{src, dst, timeout|ProxyPass &src& &dst& connectiontimeout=5 timeout=&timeout&$(const.n)ProxyPassReverse &src& &dst&
string => "&APACHE_REVERSE_PROXY_URL_SRC,APACHE_REVERSE_PROXY_URL_DST,APACHE_REVERSE_PROXY_TIMEOUT:{src, dst, timeout|ProxyPass &src& &dst& connectiontimeout=5 timeout=&timeout&${const.n}ProxyPassReverse &src& &dst&
}&";
"rudder_reverse_proxy_params[selinux]"
string => "&APACHE_REVERSE_PROXY_ADJUST_SELINUX&";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ bundle agent check_apt_package_installation
debian::
"${apt_package[${index_aptpkg}]}"
package_policy => "${apt_action[${index_aptpkg}]}",
package_method => apt_nobulk("30", "$(apt_allow_untrusted[$(index_aptpkg)])"),
package_method => apt_nobulk("30", "${apt_allow_untrusted[${index_aptpkg}]}"),
classes => kept_if_else("debian_install_kept_${apt_package[${index_aptpkg}]}", "debian_installed_${apt_package[${index_aptpkg}]}", "debian_install_failed_${apt_package[${index_aptpkg}]}"),
ifvarclass => "!${index_aptpkg}_package_version_defined",
comment => "Handling ${apt_package[${index_aptpkg}]} using apt_nobulk, policy : ${apt_action[${index_aptpkg}]}";

"${apt_package[${index_aptpkg}]}"
package_policy => "${apt_action[${index_aptpkg}]}",
package_method => apt_nobulk("30", "$(apt_allow_untrusted[$(index_aptpkg)])"),
package_method => apt_nobulk("30", "${apt_allow_untrusted[${index_aptpkg}]}"),
package_select => "${apt_version_criterion[${index_aptpkg}]}",
package_version => "${apt_version[${index_aptpkg}]}",
classes => kept_if_else("debian_install_kept_${apt_package[${index_aptpkg}]}", "debian_installed_${apt_package[${index_aptpkg}]}", "debian_install_failed_${apt_package[${index_aptpkg}]}"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ bundle agent check_openvpn_client_configuration
"@@openvpnClientConfiguration@@result_error@@&TRACKINGKEY&@@OpenVPN configuration@@None@@${g.execRun}##${g.uuid}@#OpenVPN keyring could not be written";

ovpn_client_nopwauth.((openvpn_tier1_validated.openvpn_tier2_validated)|(openvpn_tier1_kept.openvpn_tier2_kept))::
"@@openvpnClientConfiguration@@result_success@@&TRACKINGKEY&@@OpenVPN configuration@@None@@$(g.execRun)##$(g.uuid)@#OpenVPN configuration is set correctly";
"@@openvpnClientConfiguration@@result_success@@&TRACKINGKEY&@@OpenVPN configuration@@None@@${g.execRun}##${g.uuid}@#OpenVPN configuration is set correctly";

ovpn_client_pwauth.((openvpn_tier1_validated.openvpn_tier2_validated.openvpn_keyring_validated)|(openvpn_tier1_kept.openvpn_tier2_kept.openvpn_keyring_kept))::
"@@openvpnClientConfiguration@@result_success@@&TRACKINGKEY&@@OpenVPN configuration@@None@@$(g.execRun)##$(g.uuid)@#OpenVPN configuration is set correctly";
"@@openvpnClientConfiguration@@result_success@@&TRACKINGKEY&@@OpenVPN configuration@@None@@${g.execRun}##${g.uuid}@#OpenVPN configuration is set correctly";

(openvpn_tier1_validated.openvpn_tier2_validated.openvpn_keyring_validated)|(openvpn_tier1_kept.openvpn_tier2_kept.openvpn_keyring_kept)::
"@@openvpnClientConfiguration@@result_success@@&TRACKINGKEY&@@OpenVPN configuration@@None@@${g.execRun}##${g.uuid}@#OpenVPN configuration is set correctly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,26 @@ bundle agent check_rpm_package_installation {

classes:

"$(index_rpmpkg)_package_version_defined" not => strcmp("$(rpm_data[$(index_rpmpkg)][1])", "default");
"${index_rpmpkg}_package_version_defined" not => strcmp("${rpm_data[${index_rpmpkg}][1]}", "default");

packages:

redhat|SuSE::
"$(rpm_package[$(index_rpmpkg)])"
package_policy => "$(rpm_data[$(index_rpmpkg)][0])",
"${rpm_package[${index_rpmpkg}]}"
package_policy => "${rpm_data[${index_rpmpkg}][0]}",
package_method => generic_nobulk("30"),
classes => rudder_common_classes_persist("rpm_package_installation_${index_rpmpkg}", "${rpm_package_check_interval}"),
ifvarclass => "!${index_rpmpkg}_package_version_defined.!(rpm_package_installation_${index_rpmpkg}_repaired|rpm_package_installation_${index_rpmpkg}_error|rpm_package_installation_${index_rpmpkg}_kept)",
comment => "Handling $(rpm_package[$(index_rpmpkg)]) using yum_nobulk, policy : $(rpm_data[$(index_rpmpkg)][0])";
comment => "Handling ${rpm_package[${index_rpmpkg}]} using yum_nobulk, policy : ${rpm_data[${index_rpmpkg}][0]}";

"$(rpm_package[$(index_rpmpkg)])"
package_policy => "$(rpm_data[$(index_rpmpkg)][0])",
"${rpm_package[${index_rpmpkg}]}"
package_policy => "${rpm_data[${index_rpmpkg}][0]}",
package_method => generic_nobulk("30"),
package_select => "$(rpm_data[$(index_rpmpkg)][2])",
package_version => "$(rpm_version[$(index_rpmpkg)])",
package_select => "${rpm_data[${index_rpmpkg}][2]}",
package_version => "${rpm_version[${index_rpmpkg}]}",
classes => rudder_common_classes_persist("rpm_package_installation_${index_rpmpkg}", "${rpm_package_check_interval}"),
ifvarclass => "${index_rpmpkg}_package_version_defined.!(rpm_package_installation_${index_rpmpkg}_repaired|rpm_package_installation_${index_rpmpkg}_error|rpm_package_installation_${index_rpmpkg}_kept)",
comment => "Handling $(rpm_package[$(index_rpmpkg)]) using yum_nobulk, policy : $(rpm_data[$(index_rpmpkg)][0])";
comment => "Handling ${rpm_package[${index_rpmpkg}]} using yum_nobulk, policy : ${rpm_data[${index_rpmpkg}][0]}";

processes:

Expand All @@ -127,27 +127,27 @@ bundle agent check_rpm_package_installation {

redhat|SuSE::

"@@packageInstallation@@result_repaired@@$(rpm_data[$(index_rpmpkg)][3])@@RHEL/CentOS/SuSE packages@@$(rpm_package[$(index_rpmpkg)])@@$(g.execRun)##$(g.uuid)@#Performed repair action for RPM package $(rpm_package[$(index_rpmpkg)]) to comply with policy: $(rpm_data[$(index_rpmpkg)][0])"
"@@packageInstallation@@result_repaired@@${rpm_data[${index_rpmpkg}][3]}@@RHEL/CentOS/SuSE packages@@${rpm_package[${index_rpmpkg}]}@@${g.execRun}##${g.uuid}@#Performed repair action for RPM package ${rpm_package[${index_rpmpkg}]} to comply with policy: ${rpm_data[${index_rpmpkg}][0]}"
ifvarclass => canonify("rpm_package_installation_${index_rpmpkg}_repaired");

"@@packageInstallation@@result_error@@$(rpm_data[$(index_rpmpkg)][3])@@RHEL/CentOS/SuSE packages@@$(rpm_package[$(index_rpmpkg)])@@$(g.execRun)##$(g.uuid)@#Error taking action for RPM package $(rpm_package[$(index_rpmpkg)]) with policy: $(rpm_data[$(index_rpmpkg)][0])"
"@@packageInstallation@@result_error@@${rpm_data[${index_rpmpkg}][3]}@@RHEL/CentOS/SuSE packages@@${rpm_package[${index_rpmpkg}]}@@${g.execRun}##${g.uuid}@#Error taking action for RPM package ${rpm_package[${index_rpmpkg}]} with policy: ${rpm_data[${index_rpmpkg}][0]}"
ifvarclass => canonify("rpm_package_installation_${index_rpmpkg}_error");

"@@packageInstallation@@result_success@@$(rpm_data[$(index_rpmpkg)][3])@@RHEL/CentOS/SuSE packages@@$(rpm_package[$(index_rpmpkg)])@@$(g.execRun)##$(g.uuid)@#No action required for RPM package $(rpm_package[$(index_rpmpkg)]) with policy: $(rpm_data[$(index_rpmpkg)][0])"
"@@packageInstallation@@result_success@@${rpm_data[${index_rpmpkg}][3]}@@RHEL/CentOS/SuSE packages@@${rpm_package[${index_rpmpkg}]}@@${g.execRun}##${g.uuid}@#No action required for RPM package ${rpm_package[${index_rpmpkg}]} with policy: ${rpm_data[${index_rpmpkg}][0]}"
ifvarclass => canonify("rpm_package_installation_${index_rpmpkg}_kept");

# ZMD Process presence related reports
(redhat|SuSE).!(SuSE_10.!zypper_version_ok)::
"@@packageInstallation@@result_success@@$(rpm_data[$(index_rpmpkg)][3])@@ZMD process@@None@@$(g.execRun)##$(g.uuid)@#ZMD process presence verification not necessary. Skipping ...";
"@@packageInstallation@@result_success@@${rpm_data[${index_rpmpkg}][3]}@@ZMD process@@None@@${g.execRun}##${g.uuid}@#ZMD process presence verification not necessary. Skipping ...";

(redhat|SuSE).SuSE_10.!zmd_restart.!zypper_version_ok::
"@@packageInstallation@@result_success@@$(rpm_data[$(index_rpmpkg)][3])@@ZMD process@@None@@$(g.execRun)##$(g.uuid)@#The ZMD process is present. Skipping ...";
"@@packageInstallation@@result_success@@${rpm_data[${index_rpmpkg}][3]}@@ZMD process@@None@@${g.execRun}##${g.uuid}@#The ZMD process is present. Skipping ...";

(redhat|SuSE).SuSE_10.zmd_restarted.!zypper_version_ok::
"@@packageInstallation@@result_repaired@@$(rpm_data[$(index_rpmpkg)][3])@@ZMD process@@None@@$(g.execRun)##$(g.uuid)@#The ZMD daemon was successfully restarted";
"@@packageInstallation@@result_repaired@@${rpm_data[${index_rpmpkg}][3]}@@ZMD process@@None@@${g.execRun}##${g.uuid}@#The ZMD daemon was successfully restarted";

(redhat|SuSE).SuSE_10.could_not_restart_zmd.!zypper_version_ok::
"@@packageInstallation@@result_error@@$(rpm_data[$(index_rpmpkg)][3])@@ZMD process@@None@@$(g.execRun)##$(g.uuid)@#The ZMD daemon failed to restart";
"@@packageInstallation@@result_error@@${rpm_data[${index_rpmpkg}][3]}@@ZMD process@@None@@${g.execRun}##${g.uuid}@#The ZMD daemon failed to restart";

}

Expand All @@ -164,33 +164,33 @@ redhat::

package_installed_regex => ".*";
package_name_convention => "${name}-${version}";
package_list_update_ifelapsed => "$(rpm_pkg_timeout)";
package_list_update_ifelapsed => "${rpm_pkg_timeout}";
package_add_command => "/usr/bin/yum -y install";
package_delete_command => "/bin/rpm -e";
package_verify_command => "/bin/rpm -V";

zypper_version_ok::
package_list_command => "/bin/rpm -qa --queryformat \"i | repos | %{name} | %{version}-%{release} | %{arch}\n\"";
package_list_update_ifelapsed => "$(rpm_pkg_timeout)";
package_list_update_ifelapsed => "${rpm_pkg_timeout}";
package_installed_regex => "i.*";
package_list_name_regex => "[^|]+\|[^|]+\|\s+([^\s]+).*";
package_list_version_regex => "[^|]+\|[^|]+\|[^|]+\|\s+([^\s]+).*";
package_list_arch_regex => "[^|]+\|[^|]+\|[^|]+\|[^|]+\|\s+([^\s]+).*";
package_name_convention => "$(name)";
package_name_convention => "${name}";
package_add_command => "/usr/bin/zypper --non-interactive install";
package_delete_command => "/usr/bin/zypper --non-interactive remove --force-resolution";
package_update_command => "/usr/bin/zypper --non-interactive update";
package_verify_command => "/usr/bin/zypper --non-interactive verify$";

SuSE_10.!zypper_version_ok::
package_list_command => "/bin/rpm -qa --queryformat \"i | repos | %{name} | %{version}-%{release} | %{arch}\n\"";
package_list_update_ifelapsed => "$(rpm_pkg_timeout)";
package_list_update_ifelapsed => "${rpm_pkg_timeout}";
package_installed_regex => "i.*";
package_list_name_regex => "[^|]+\|[^|]+\|\s+([^\s]+).*";
package_list_version_regex => "[^|]+\|[^|]+\|[^|]+\|\s+([^\s]+).*";
package_list_arch_regex => "[^|]+\|[^|]+\|[^|]+\|[^|]+\|\s+([^\s]+).*";

package_name_convention => "$(name)";
package_name_convention => "${name}";
package_add_command => "/usr/bin/rug install -y";
package_delete_command => "/usr/bin/rug remove -y";
package_update_command => "/usr/bin/rug update -y";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ bundle edit_line set_zypper_repos_BROKEN(zypper_name, zypper_url, zypper_enabled
reports:

# Repositories
"@@zypperPackageManagerSettings@@result_success@@${zypper_uuid[${zypper_index}]}@@Repository@@$(zypper_url[${zypper_index}])@@${g.execRun}##${g.uuid}@#The ZYPPER source $(zypper_name[${zypper_index}]) was already here. Skipping..."
"@@zypperPackageManagerSettings@@result_success@@${zypper_uuid[${zypper_index}]}@@Repository@@${zypper_url[${zypper_index}]}@@${g.execRun}##${g.uuid}@#The ZYPPER source ${zypper_name[${zypper_index}]} was already here. Skipping..."
ifvarclass => "source_${zypper_index}_kept.!source_${zypper_index}_ok";

"@@zypperPackageManagerSettings@@result_repaired@@${zypper_uuid[${zypper_index}]}@@Repository@@${zypper_url[${zypper_index}]}@@${g.execRun}##${g.uuid}@#The ZYPPER source ${zypper_name[${zypper_index}]} has been successfully added"
Expand Down
Loading

0 comments on commit 6fe35ee

Please sign in to comment.