@bundle agent check_zypper_settings
{
vars:
"zypper_name[1]" string => "SLES11-SP2-Core";
"zypper_name[2]" string => "SLES11-SP2-LTSS-Updates";
"/etc/zypp/repos.d/rudder-${zypper_name[${zypper_index}]}.repo"
create => "true",
perms => m("644"),
edit_line => set_zypper_repos("${zypper_name[${zypper_index}]}", "${zypper_url[${zypper_index}]}", "${zypper_enabled[${zypper_index}]}", "${zypper_type[${zypper_index}]}", "${g.rudder_too
ls}/zypper-repo.tpl"),
edit_defaults => empty_backup,
classes => kept_if_else("zypper_${zypper_index}_kept", "zypper_${zypper_index}_validated", "zypper_${zypper_index}_failed");
SuSE.zypper_disablerepositories::
"/etc/zypp/repos.d/.*"
"zypper_name[3]" string => "SLES11-SP2-Updates";
"zypper_url[1]" string => "http://yayayayaayayadadada/repo/$RCE/SLES11-SP2-Core/sle-11-x86_64/";
"zypper_url[2]" string => "http://yayayayaayayadadada/repo/$RCE/SLES11-SP2-LTSS-Updates/sle-11-x86_64/";
"zypper_url[3]" string => "http://yayayayaayayadadada/repo/$RCE/SLES11-SP2-Updates/sle-11-x86_64/";
"zypper_type[1]" string => "yast2";
"zypper_type[2]" string => "yast2";
"zypper_type[3]" string => "yast2";
"zypper_enabled[1]" string => "1";
"zypper_enabled[2]" string => "1";
"zypper_enabled[3]" string => "1";
"zypper_uuid[1]" string => "1fc56ad1-f302-4c92-8314-07ed7dfe447c@95108f15-c19e-4ce2-949a-9d268dd63ff2
@6";
"zypper_uuid[2]" string => "1fc56ad1-f302-4c92-8314-07ed7dfe447c@95108f15-c19e-4ce2-949a-9d268dd63ff2
@6";
"zypper_uuid3" string => "1fc56ad1-f302-4c92-8314-07ed7dfe447c@95108f15-c19e-4ce2-949a-9d268dd63ff2
@6";
- Repositories edition ?
"zypper_repositories_edit" expression => strcmp("true","true");
- Disable repositories ?
"zypper_disablerepositories" not => strcmp("false","false");
files:
SuSE::
"/etc/zypp/zypp.conf"
create => "true",
perms => mog("644", "root", "root"),
edit_defaults => noempty_backup,
edit_line => set_advanced_zypper_config_values("check_zypper_settings.zmdconf", "${zypper_sections}"),
classes => kept_if_else("zypper_conf_kept", "zypper_conf_validated", "zypper_conf_failed");
SuSE.zypper_repositories_edit::
:
- perms => m("644"),
# classes => kept_if_else("zypper_tier1_kept", "zypper_tier1_validated", "zypper_tier1_failed");
"/etc/zypp/repos.d/rudder-${zypper_name[${zypper_index}]}.repo"
create => "true",
perms => m("644"),
edit_line => set_zypper_repos("${zypper_name[${zypper_index}]}", "${zypper_url[${zypper_index}]}", "${zypper_enabled[${zypper_index}]}", "${zypper_type[${zypper_index}]}", "${g.rudder_too
ls}/zypper-repo.tpl"),
edit_defaults => empty_backup,
classes => kept_if_else("zypper_${zypper_index}_kept", "zypper_${zypper_index}_validated", "zypper_${zypper_index}_failed");
SuSE.zypper_disablerepositories::
"/etc/zypp/repos.d/.*"
delete => tidy,
file_select => ex_list("{zypper_files}"),
depth_search => recurse("inf"),
classes => kept_if_else("repos_disabled_kept", "repos_disabled_ok", "repos_disabled_fail"),
comment => "Delete the unwanted repos as requested";