|
1 | 1 | require 'beaker-rspec/spec_helper' |
2 | 2 | require 'beaker-rspec/helpers/serverspec' |
| 3 | +require 'beaker/puppet_install_helper' |
| 4 | + |
| 5 | +run_puppet_install_helper |
| 6 | + |
| 7 | +UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse'] |
3 | 8 |
|
4 | 9 | class String |
5 | 10 | # Provide ability to remove indentation from strings, for the purpose of |
@@ -34,27 +39,6 @@ def psql(psql_cmd, user = 'postgres', exit_codes = [0,1], &block) |
34 | 39 | shell("su #{shellescape(user)} -c #{shellescape(psql)}", :acceptable_exit_codes => exit_codes, &block) |
35 | 40 | end |
36 | 41 |
|
37 | | -unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' |
38 | | - # This will install the latest available package on el and deb based |
39 | | - # systems fail on windows and osx, and install via gem on other *nixes |
40 | | - foss_opts = { :default_action => 'gem_install' } |
41 | | - |
42 | | - if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end |
43 | | - |
44 | | - hosts.each do |host| |
45 | | - shell("mkdir -p #{host['distmoduledir']}") |
46 | | - if ! host.is_pe? |
47 | | - # Augeas is only used in one place, for Redhat. |
48 | | - if fact('osfamily') == 'RedHat' |
49 | | - install_package host, 'ruby-devel' |
50 | | - #install_package host, 'augeas-devel' |
51 | | - #install_package host, 'ruby-augeas' |
52 | | - end |
53 | | - end |
54 | | - end |
55 | | -end |
56 | | - |
57 | | -UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse'] |
58 | 42 |
|
59 | 43 | RSpec.configure do |c| |
60 | 44 | # Project root |
@@ -92,7 +76,7 @@ def psql(psql_cmd, user = 'postgres', exit_codes = [0,1], &block) |
92 | 76 | hosts.each do |host| |
93 | 77 | on host, "/bin/touch #{default['puppetpath']}/hiera.yaml" |
94 | 78 | on host, 'chmod 755 /root' |
95 | | - if fact('osfamily') == 'Debian' |
| 79 | + if fact_on(host, 'osfamily') == 'Debian' |
96 | 80 | on host, "echo \"en_US ISO-8859-1\nen_NG.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\n\" > /etc/locale.gen" |
97 | 81 | on host, '/usr/sbin/locale-gen' |
98 | 82 | on host, '/usr/sbin/update-locale' |
|
0 commit comments