@@ -26,7 +26,7 @@ def redhat_familly_supported_os
2626
2727 def global_facts ( facts , os )
2828 facts . merge (
29- if %r{sles} . match? ( os )
29+ if os . include? ( 'sles' )
3030 {
3131 is_pe : true ,
3232 env_temp_variable : '/tmp' ,
@@ -36,17 +36,17 @@ def global_facts(facts, os)
3636 {
3737 env_temp_variable : '/tmp' ,
3838 }
39- elsif %r{solaris} . match? ( os )
39+ elsif os . include? ( 'solaris' )
4040 {
4141 is_pe : true ,
4242 puppet_agent_pid : 298 ,
4343 }
44- elsif %r{aix} . match? ( os )
44+ elsif os . include? ( 'aix' )
4545 {
4646 is_pe : true ,
4747 platform_tag : "aix-#{ AIX_VERSION [ facts . dig ( :os , 'release' , 'major' ) ] } -power" ,
4848 }
49- elsif %r{windows} . match? ( os )
49+ elsif os . include? ( 'windows' )
5050 {
5151 puppet_agent_appdata : 'C:\\ProgramData' ,
5252 puppet_confdir : 'C:\\ProgramData\\Puppetlabs\\puppet\\etc' ,
@@ -291,7 +291,7 @@ def global_facts(facts, os)
291291 end
292292
293293 let ( :expected_package_install_options ) do
294- if %r{aix} . match? ( os )
294+ if os . include? ( 'aix' )
295295 [ '--ignoreos' , 'OPTION1=value1' , 'OPTION2=value2' ]
296296 else
297297 [ 'OPTION1=value1' , 'OPTION2=value2' ]
@@ -307,7 +307,7 @@ def global_facts(facts, os)
307307 it { is_expected . to contain_package ( 'puppet-agent' ) . with_install_options ( expected_package_install_options ) }
308308 end
309309
310- if %r{solaris-10} . match? ( os )
310+ if os . include? ( 'solaris-10' )
311311 it do
312312 is_expected . to contain_exec ( 'solaris_install script' )
313313 . with_command (
@@ -349,7 +349,7 @@ def global_facts(facts, os)
349349 it { is_expected . to contain_package ( 'puppet-agent' ) . with_ensure ( package_version ) }
350350 end
351351
352- unless %r{windows} . match? ( os )
352+ unless os . include? ( 'windows' )
353353 unless %r{sles|solaris|aix} . match? ( os )
354354 it { is_expected . to contain_class ( 'puppet_agent::service' ) . that_requires ( 'Class[puppet_agent::configure]' ) }
355355 end
0 commit comments