@@ -34,28 +34,22 @@ def psql(psql_cmd, user = 'postgres', exit_codes = [0], &block)
34
34
shell ( "su #{ shellescape ( user ) } -c #{ shellescape ( psql ) } " , :acceptable_exit_codes => exit_codes , &block )
35
35
end
36
36
37
- hosts . each do |host |
38
- if host [ 'platform' ] =~ /debian/
39
- on host , 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc'
40
- end
41
- if host . is_pe?
37
+ unless ENV [ 'RS_PROVISION' ] == 'no' or ENV [ 'BEAKER_provision' ] == 'no'
38
+ if hosts . first . is_pe?
42
39
install_pe
43
40
else
44
- # Install Puppet
45
- install_package host , 'rubygems'
46
- on host , 'gem install puppet --no-ri --no-rdoc'
47
- on host , "mkdir -p #{ host [ 'distmoduledir' ] } "
48
- osfamily = fact 'osfamily'
49
- # install augeas dependencies
50
- if osfamily =~ /Debian/
51
- install_package host , 'ruby-dev'
52
- install_package host , 'libaugeas-dev'
53
- end
54
- if osfamily =~ /RedHat/
55
- install_package host , 'ruby-devel'
56
- install_package host , 'augeas-devel'
41
+ install_puppet
42
+ end
43
+ on hosts , "mkdir -p #{ host [ 'distmoduledir' ] } "
44
+ hosts . each do |host |
45
+ if ! host . is_pe?
46
+ # Augeas is only used in one place, for Redhat.
47
+ if fact ( 'osfamily' ) == 'RedHat'
48
+ install_package host , 'ruby-devel'
49
+ install_package host , 'augeas-devel'
50
+ install_package host , 'ruby-augeas'
51
+ end
57
52
end
58
- on host , 'gem install ruby-augeas --no-ri --no-rdoc'
59
53
end
60
54
end
61
55
0 commit comments