beaker-puppet 1.29.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +9 -0
  3. data/.github/workflows/release.yml +2 -2
  4. data/.github/workflows/test.yml +28 -7
  5. data/.rubocop.yml +5 -0
  6. data/.rubocop_todo.yml +842 -0
  7. data/CHANGELOG.md +31 -0
  8. data/Gemfile +5 -20
  9. data/Rakefile +64 -169
  10. data/acceptance/config/acceptance-options.rb +3 -3
  11. data/acceptance/config/gem/acceptance-options.rb +8 -8
  12. data/acceptance/config/git/acceptance-options.rb +8 -8
  13. data/acceptance/config/pkg/acceptance-options.rb +7 -7
  14. data/acceptance/pre_suite/gem/install.rb +6 -6
  15. data/acceptance/pre_suite/git/install.rb +22 -22
  16. data/acceptance/pre_suite/pkg/install.rb +3 -3
  17. data/acceptance/tests/backwards_compatible.rb +6 -7
  18. data/acceptance/tests/clone_git_repo_on_test.rb +12 -13
  19. data/acceptance/tests/create_tmpdir_on_test.rb +13 -9
  20. data/acceptance/tests/install_smoke_test.rb +5 -4
  21. data/acceptance/tests/stub_host.rb +11 -10
  22. data/acceptance/tests/web_helpers_test.rb +11 -10
  23. data/beaker-puppet.gemspec +16 -23
  24. data/bin/beaker-puppet +2 -4
  25. data/lib/beaker-puppet/helpers/facter_helpers.rb +9 -7
  26. data/lib/beaker-puppet/helpers/host_helpers.rb +10 -7
  27. data/lib/beaker-puppet/helpers/puppet_helpers.rb +151 -160
  28. data/lib/beaker-puppet/helpers/rake_helpers.rb +1 -1
  29. data/lib/beaker-puppet/helpers/tk_helpers.rb +22 -28
  30. data/lib/beaker-puppet/install_utils/aio_defaults.rb +39 -43
  31. data/lib/beaker-puppet/install_utils/ezbake_utils.rb +34 -42
  32. data/lib/beaker-puppet/install_utils/foss_defaults.rb +134 -138
  33. data/lib/beaker-puppet/install_utils/foss_utils.rb +293 -320
  34. data/lib/beaker-puppet/install_utils/module_utils.rb +58 -70
  35. data/lib/beaker-puppet/install_utils/puppet5.rb +30 -35
  36. data/lib/beaker-puppet/install_utils/puppet_utils.rb +58 -68
  37. data/lib/beaker-puppet/install_utils/windows_utils.rb +34 -36
  38. data/lib/beaker-puppet/version.rb +1 -1
  39. data/lib/beaker-puppet/wrappers.rb +13 -14
  40. data/lib/beaker-puppet.rb +4 -5
  41. data/setup/aio/010_Install_Puppet_Agent.rb +5 -6
  42. data/setup/common/000-delete-puppet-when-none.rb +2 -4
  43. data/setup/common/003_solaris_cert_fix.rb +74 -70
  44. data/setup/common/005_redhat_subscription_fix.rb +3 -2
  45. data/setup/common/011_Install_Puppet_Server.rb +7 -9
  46. data/setup/common/012_Finalize_Installs.rb +5 -5
  47. data/setup/common/025_StopFirewall.rb +1 -1
  48. data/setup/common/030_StopSssd.rb +2 -2
  49. data/setup/common/040_ValidateSignCert.rb +10 -12
  50. data/setup/common/045_EnsureMasterStarted.rb +2 -2
  51. data/setup/gem/010_GemInstall.rb +5 -4
  52. data/setup/git/000_EnvSetup.rb +48 -48
  53. data/setup/git/010_TestSetup.rb +13 -12
  54. data/setup/git/020_PuppetUserAndGroup.rb +3 -2
  55. data/setup/git/060_InstallModules.rb +14 -14
  56. data/setup/git/070_InstallCACerts.rb +82 -82
  57. data/spec/beaker-puppet/helpers/facter_helpers_spec.rb +22 -24
  58. data/spec/beaker-puppet/helpers/host_helpers_spec.rb +10 -6
  59. data/spec/beaker-puppet/helpers/puppet_helpers_spec.rb +506 -517
  60. data/spec/beaker-puppet/helpers/tk_helpers_spec.rb +20 -24
  61. data/spec/beaker-puppet/install_utils/ezbake_utils_spec.rb +86 -90
  62. data/spec/beaker-puppet/install_utils/foss_utils_spec.rb +636 -599
  63. data/spec/beaker-puppet/install_utils/module_utils_spec.rb +125 -116
  64. data/spec/beaker-puppet/install_utils/puppet5_spec.rb +159 -165
  65. data/spec/beaker-puppet/install_utils/puppet_utils_spec.rb +92 -77
  66. data/spec/beaker-puppet/install_utils/windows_utils_spec.rb +101 -89
  67. data/spec/beaker-puppet/wrappers_spec.rb +10 -10
  68. data/spec/helpers.rb +85 -91
  69. data/tasks/ci.rake +171 -179
  70. metadata +33 -62
  71. data/setup/common/020_InstallCumulusModules.rb +0 -13
  72. data/setup/common/021_InstallAristaModuleMasters.rb +0 -12
  73. data/setup/common/022_InstallAristaModuleAgents.rb +0 -13
@@ -5,135 +5,133 @@ module Beaker
5
5
  # This module contains default values for FOSS puppet paths and directorys per-platform
6
6
  #
7
7
  module FOSSDefaults
8
-
9
- #Here be the default download URLs
8
+ # Here be the default download URLs
10
9
  FOSS_DEFAULT_DOWNLOAD_URLS = {
11
- :win_download_url => "https://downloads.puppet.com/windows",
12
- :mac_download_url => "https://downloads.puppet.com/mac",
13
- :pe_promoted_builds_url => "https://pm.puppet.com",
14
- :release_apt_repo_url => "https://apt.puppet.com",
15
- :release_yum_repo_url => "https://yum.puppet.com",
16
- :nightly_builds_url => "https://nightlies.puppet.com",
17
- :nightly_apt_repo_url => "https://nightlies.puppet.com/apt",
18
- :nightly_yum_repo_url => "https://nightlies.puppet.com/yum",
19
- :nightly_win_download_url => "https://nightlies.puppet.com/downloads/windows",
20
- :nightly_mac_download_url => "https://nightlies.puppet.com/downloads/mac",
21
- :dev_builds_url => "https://builds.delivery.puppetlabs.net",
10
+ win_download_url: 'https://downloads.puppet.com/windows',
11
+ mac_download_url: 'https://downloads.puppet.com/mac',
12
+ pe_promoted_builds_url: 'https://pm.puppet.com',
13
+ release_apt_repo_url: 'https://apt.puppet.com',
14
+ release_yum_repo_url: 'https://yum.puppet.com',
15
+ nightly_builds_url: 'https://nightlies.puppet.com',
16
+ nightly_apt_repo_url: 'https://nightlies.puppet.com/apt',
17
+ nightly_yum_repo_url: 'https://nightlies.puppet.com/yum',
18
+ nightly_win_download_url: 'https://nightlies.puppet.com/downloads/windows',
19
+ nightly_mac_download_url: 'https://nightlies.puppet.com/downloads/mac',
20
+ dev_builds_url: 'https://builds.delivery.puppetlabs.net',
22
21
  }
23
22
 
24
- #Here be the pathing and default values for FOSS installs
23
+ # Here be the pathing and default values for FOSS installs
25
24
  #
26
25
  FOSS_DEFAULTS = {
27
26
  'freebsd' => {
28
27
  'puppetserver-confdir' => '/etc/puppetserver/conf.d',
29
- 'puppetservice' => 'puppetmaster',
30
- 'puppetpath' => '/usr/local/etc/puppet/modules',
31
- 'puppetvardir' => '/var/lib/puppet',
32
- 'puppetbin' => '/usr/bin/puppet',
33
- 'puppetbindir' => '/usr/bin',
34
- 'hieralibdir' => '/opt/puppet-git-repos/hiera/lib',
28
+ 'puppetservice' => 'puppetmaster',
29
+ 'puppetpath' => '/usr/local/etc/puppet/modules',
30
+ 'puppetvardir' => '/var/lib/puppet',
31
+ 'puppetbin' => '/usr/bin/puppet',
32
+ 'puppetbindir' => '/usr/bin',
33
+ 'hieralibdir' => '/opt/puppet-git-repos/hiera/lib',
35
34
  'hierapuppetlibdir' => '/opt/puppet-git-repos/hiera-puppet/lib',
36
- 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
37
- 'hieradatadir' => '/usr/local/etc/puppet/modules/hieradata',
38
- 'hieraconf' => '/usr/local/etc/puppet/modules/hiera.yaml',
39
- 'distmoduledir' => '/usr/local/etc/puppet/modules',
40
- 'sitemoduledir' => '/usr/share/puppet/modules',
35
+ 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
36
+ 'hieradatadir' => '/usr/local/etc/puppet/modules/hieradata',
37
+ 'hieraconf' => '/usr/local/etc/puppet/modules/hiera.yaml',
38
+ 'distmoduledir' => '/usr/local/etc/puppet/modules',
39
+ 'sitemoduledir' => '/usr/share/puppet/modules',
41
40
  },
42
41
  'openbsd' => {
43
42
  'puppetserver-confdir' => '/etc/puppetserver/conf.d',
44
- 'puppetservice' => 'puppetmaster',
45
- 'puppetpath' => '/etc/puppet/modules',
46
- 'puppetvardir' => '/var/puppet',
47
- 'puppetbin' => '/usr/local/bin/puppet',
48
- 'puppetbindir' => '/usr/local/bin',
49
- 'hieralibdir' => '/opt/puppet-git-repos/hiera/lib',
43
+ 'puppetservice' => 'puppetmaster',
44
+ 'puppetpath' => '/etc/puppet/modules',
45
+ 'puppetvardir' => '/var/puppet',
46
+ 'puppetbin' => '/usr/local/bin/puppet',
47
+ 'puppetbindir' => '/usr/local/bin',
48
+ 'hieralibdir' => '/opt/puppet-git-repos/hiera/lib',
50
49
  'hierapuppetlibdir' => '/opt/puppet-git-repos/hiera-puppet/lib',
51
- 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
52
- 'hieradatadir' => '/etc/puppet/hieradata',
53
- 'hieraconf' => '/etc/puppet/hiera.yaml',
54
- 'distmoduledir' => '/etc/puppet/modules',
55
- 'sitemoduledir' => '/usr/local/share/puppet/modules',
50
+ 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
51
+ 'hieradatadir' => '/etc/puppet/hieradata',
52
+ 'hieraconf' => '/etc/puppet/hiera.yaml',
53
+ 'distmoduledir' => '/etc/puppet/modules',
54
+ 'sitemoduledir' => '/usr/local/share/puppet/modules',
56
55
  },
57
56
  'mac' => {
58
57
  'puppetserver-confdir' => '/etc/puppetserver/conf.d',
59
- 'puppetservice' => 'puppetmaster',
60
- 'puppetpath' => '/etc/puppet',
61
- 'puppetconfdir' => '/etc/puppet',
62
- 'puppetcodedir' => '/etc/puppet',
63
- 'puppetvardir' => '/var/lib/puppet',
64
- 'puppetbin' => '/usr/bin/puppet',
65
- 'puppetbindir' => '/usr/bin',
66
- 'hieralibdir' => '/opt/puppet-git-repos/hiera/lib',
58
+ 'puppetservice' => 'puppetmaster',
59
+ 'puppetpath' => '/etc/puppet',
60
+ 'puppetconfdir' => '/etc/puppet',
61
+ 'puppetcodedir' => '/etc/puppet',
62
+ 'puppetvardir' => '/var/lib/puppet',
63
+ 'puppetbin' => '/usr/bin/puppet',
64
+ 'puppetbindir' => '/usr/bin',
65
+ 'hieralibdir' => '/opt/puppet-git-repos/hiera/lib',
67
66
  'hierapuppetlibdir' => '/opt/puppet-git-repos/hiera-puppet/lib',
68
- 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
69
- 'hieradatadir' => '/etc/puppet/hieradata',
70
- 'hieraconf' => '/etc/puppet/hiera.yaml',
71
- 'distmoduledir' => '/etc/puppet/modules',
72
- 'sitemoduledir' => '/usr/share/puppet/modules',
67
+ 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
68
+ 'hieradatadir' => '/etc/puppet/hieradata',
69
+ 'hieraconf' => '/etc/puppet/hiera.yaml',
70
+ 'distmoduledir' => '/etc/puppet/modules',
71
+ 'sitemoduledir' => '/usr/share/puppet/modules',
73
72
  },
74
73
  'unix' => {
75
74
  'puppetserver-confdir' => '/etc/puppetserver/conf.d',
76
- 'puppetservice' => 'puppetmaster',
77
- 'puppetpath' => '/etc/puppet',
78
- 'puppetconfdir' => '/etc/puppet',
79
- 'puppetvardir' => '/var/lib/puppet',
80
- 'puppetbin' => '/usr/bin/puppet',
81
- 'puppetbindir' => '/usr/bin',
82
- 'privatebindir' => '/usr/bin',
83
- 'hieralibdir' => '/opt/puppet-git-repos/hiera/lib',
75
+ 'puppetservice' => 'puppetmaster',
76
+ 'puppetpath' => '/etc/puppet',
77
+ 'puppetconfdir' => '/etc/puppet',
78
+ 'puppetvardir' => '/var/lib/puppet',
79
+ 'puppetbin' => '/usr/bin/puppet',
80
+ 'puppetbindir' => '/usr/bin',
81
+ 'privatebindir' => '/usr/bin',
82
+ 'hieralibdir' => '/opt/puppet-git-repos/hiera/lib',
84
83
  'hierapuppetlibdir' => '/opt/puppet-git-repos/hiera-puppet/lib',
85
- 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
86
- 'hieradatadir' => '/etc/puppet/hieradata',
87
- 'hieraconf' => '/etc/puppet/hiera.yaml',
88
- 'distmoduledir' => '/etc/puppet/modules',
89
- 'sitemoduledir' => '/usr/share/puppet/modules',
84
+ 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
85
+ 'hieradatadir' => '/etc/puppet/hieradata',
86
+ 'hieraconf' => '/etc/puppet/hiera.yaml',
87
+ 'distmoduledir' => '/etc/puppet/modules',
88
+ 'sitemoduledir' => '/usr/share/puppet/modules',
90
89
  },
91
90
  'archlinux' => {
92
91
  'puppetserver-confdir' => '/etc/puppetserver/conf.d',
93
- 'puppetservice' => 'puppetmaster',
94
- 'puppetpath' => '/etc/puppetlabs/puppet',
95
- 'puppetconfdir' => '/etc/puppetlabs/puppet',
96
- 'puppetvardir' => '/opt/puppetlabs/puppet/cache',
97
- 'puppetbin' => '/usr/bin/puppet',
98
- 'puppetbindir' => '/usr/bin',
99
- 'privatebindir' => '/usr/bin',
100
- 'hieralibdir' => '/var/lib/hiera',
92
+ 'puppetservice' => 'puppetmaster',
93
+ 'puppetpath' => '/etc/puppetlabs/puppet',
94
+ 'puppetconfdir' => '/etc/puppetlabs/puppet',
95
+ 'puppetvardir' => '/opt/puppetlabs/puppet/cache',
96
+ 'puppetbin' => '/usr/bin/puppet',
97
+ 'puppetbindir' => '/usr/bin',
98
+ 'privatebindir' => '/usr/bin',
99
+ 'hieralibdir' => '/var/lib/hiera',
101
100
  'hierapuppetlibdir' => '/opt/puppet-git-repos/hiera-puppet/lib',
102
- 'hierabindir' => '/usr/bin',
103
- 'hieradatadir' => '/etc/puppetlabs/code/hiera',
104
- 'hieraconf' => '/etc/hiera.yaml',
105
- 'distmoduledir' => '/etc/puppetlabs/code/modules',
106
- 'sitemoduledir' => '/usr/share/puppet/modules',
101
+ 'hierabindir' => '/usr/bin',
102
+ 'hieradatadir' => '/etc/puppetlabs/code/hiera',
103
+ 'hieraconf' => '/etc/hiera.yaml',
104
+ 'distmoduledir' => '/etc/puppetlabs/code/modules',
105
+ 'sitemoduledir' => '/usr/share/puppet/modules',
107
106
  },
108
- 'windows' => { #cygwin windows
109
- 'puppetpath' => '`cygpath -smF 35`/PuppetLabs/puppet/etc',
110
- 'puppetconfdir' => '`cygpath -smF 35`/PuppetLabs/puppet/etc',
111
- 'puppetcodedir' => '`cygpath -smF 35`/PuppetLabs/puppet/etc',
112
- 'hieraconf' => '`cygpath -smF 35`/Puppetlabs/puppet/etc/hiera.yaml',
113
- 'puppetvardir' => '`cygpath -smF 35`/PuppetLabs/puppet/var',
114
- 'distmoduledir' => '`cygpath -smF 35`/PuppetLabs/puppet/etc/modules',
115
- 'sitemoduledir' => 'C:/usr/share/puppet/modules',
116
- 'hieralibdir' => '`cygpath -w /opt/puppet-git-repos/hiera/lib`',
107
+ 'windows' => { # cygwin windows
108
+ 'puppetpath' => '`cygpath -smF 35`/PuppetLabs/puppet/etc',
109
+ 'puppetconfdir' => '`cygpath -smF 35`/PuppetLabs/puppet/etc',
110
+ 'puppetcodedir' => '`cygpath -smF 35`/PuppetLabs/puppet/etc',
111
+ 'hieraconf' => '`cygpath -smF 35`/Puppetlabs/puppet/etc/hiera.yaml',
112
+ 'puppetvardir' => '`cygpath -smF 35`/PuppetLabs/puppet/var',
113
+ 'distmoduledir' => '`cygpath -smF 35`/PuppetLabs/puppet/etc/modules',
114
+ 'sitemoduledir' => 'C:/usr/share/puppet/modules',
115
+ 'hieralibdir' => '`cygpath -w /opt/puppet-git-repos/hiera/lib`',
117
116
  'hierapuppetlibdir' => '`cygpath -w /opt/puppet-git-repos/hiera-puppet/lib`',
118
- #let's just add both potential bin dirs to the path
119
- 'puppetbindir' => '/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet/bin:/cygdrive/c/Program Files/Puppet Labs/Puppet/bin',
120
- 'privatebindir' => '/usr/bin',
121
- 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
117
+ # let's just add both potential bin dirs to the path
118
+ 'puppetbindir' => '/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet/bin:/cygdrive/c/Program Files/Puppet Labs/Puppet/bin',
119
+ 'privatebindir' => '/usr/bin',
120
+ 'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
122
121
  },
123
- 'pswindows' => { #windows windows
124
- 'distmoduledir' => 'C:\\ProgramData\\PuppetLabs\\puppet\\etc\\modules',
125
- 'sitemoduledir' => 'C:\\usr\\share\\puppet\\modules',
126
- 'hieralibdir' => 'C:\\opt\\puppet-git-repos\\hiera\\lib',
122
+ 'pswindows' => { # windows windows
123
+ 'distmoduledir' => 'C:\\ProgramData\\PuppetLabs\\puppet\\etc\\modules',
124
+ 'sitemoduledir' => 'C:\\usr\\share\\puppet\\modules',
125
+ 'hieralibdir' => 'C:\\opt\\puppet-git-repos\\hiera\\lib',
127
126
  'hierapuppetlibdir' => 'C:\\opt\\puppet-git-repos\\hiera-puppet\\lib',
128
- 'hierabindir' => 'C:\\opt\\puppet-git-repos\\hiera\\bin',
129
- 'puppetpath' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc";"C:\\Program Files\\Puppet Labs\\Puppet\\etc"',
130
- 'hieraconf' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc\\hiera.yaml";"C:\\Program Files\\Puppet Labs\\Puppet\\etc\\hiera.yaml"',
131
- 'puppetvardir' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\var";"C:\\Program Files\\Puppet Labs\\Puppet\\var"',
132
- 'puppetbindir' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\bin";"C:\\Program Files\\Puppet Labs\\Puppet\\bin"',
127
+ 'hierabindir' => 'C:\\opt\\puppet-git-repos\\hiera\\bin',
128
+ 'puppetpath' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc";"C:\\Program Files\\Puppet Labs\\Puppet\\etc"',
129
+ 'hieraconf' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc\\hiera.yaml";"C:\\Program Files\\Puppet Labs\\Puppet\\etc\\hiera.yaml"',
130
+ 'puppetvardir' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\var";"C:\\Program Files\\Puppet Labs\\Puppet\\var"',
131
+ 'puppetbindir' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\bin";"C:\\Program Files\\Puppet Labs\\Puppet\\bin"',
133
132
  },
134
133
  }
135
134
 
136
-
137
135
  # Add the appropriate foss defaults to the host object so that they can be accessed using host[option], set host[:type] = foss
138
136
  # @param [Host] host A single host to act upon
139
137
  # @param [String] platform The platform type of this host, one of windows, pswindows, freebsd, mac & unix
@@ -141,12 +139,12 @@ module Beaker
141
139
  FOSS_DEFAULTS[platform].each_pair do |key, val|
142
140
  host[key] = val
143
141
  end
144
- # add the group and type for backwards compatability
145
- if host['platform'] =~ /windows/
146
- host['group'] = 'Administrators'
147
- else
148
- host['group'] = 'puppet'
149
- end
142
+ # add the group and type for backwards compatability
143
+ host['group'] = if host['platform'] =~ /windows/
144
+ 'Administrators'
145
+ else
146
+ 'puppet'
147
+ end
150
148
  host['type'] = 'foss'
151
149
  end
152
150
 
@@ -154,23 +152,23 @@ module Beaker
154
152
  # @param [Host, Array<Host>, String, Symbol] hosts One or more hosts to act upon,
155
153
  # or a role (String or Symbol) that identifies one or more hosts.
156
154
  def add_foss_defaults_on(hosts)
157
- block_on hosts do | host |
158
- case host.class.to_s.downcase
159
- when /aix|unix/
160
- platform = 'unix'
161
- when /freebsd/
162
- platform = 'freebsd'
163
- when /openbsd/
164
- platform = 'openbsd'
165
- when /mac/
166
- platform = 'mac'
167
- when /pswindows/
168
- platform = 'pswindows'
169
- when /archlinux/
170
- platform = 'archlinux'
171
- else
172
- platform = 'windows'
173
- end
155
+ block_on hosts do |host|
156
+ platform = case host.class.to_s.downcase
157
+ when /aix|unix/
158
+ 'unix'
159
+ when /freebsd/
160
+ 'freebsd'
161
+ when /openbsd/
162
+ 'openbsd'
163
+ when /mac/
164
+ 'mac'
165
+ when /pswindows/
166
+ 'pswindows'
167
+ when /archlinux/
168
+ 'archlinux'
169
+ else
170
+ 'windows'
171
+ end
174
172
  add_platform_foss_defaults(host, platform)
175
173
  end
176
174
  end
@@ -190,27 +188,25 @@ module Beaker
190
188
  # @param [Host, Array<Host>, String, Symbol] hosts One or more hosts to act upon,
191
189
  # or a role (String or Symbol) that identifies one or more hosts.
192
190
  def remove_foss_defaults_on(hosts)
193
- block_on hosts do | host |
194
- case host.class.to_s.downcase
195
- when /aix|unix/
196
- platform = 'unix'
197
- when /freebsd/
198
- platform = 'freebsd'
199
- when /openbsd/
200
- platform = 'openbsd'
201
- when /mac/
202
- platform = 'mac'
203
- when /pswindows/
204
- platform = 'pswindows'
205
- else
206
- platform = 'windows'
207
- end
191
+ block_on hosts do |host|
192
+ platform = case host.class.to_s.downcase
193
+ when /aix|unix/
194
+ 'unix'
195
+ when /freebsd/
196
+ 'freebsd'
197
+ when /openbsd/
198
+ 'openbsd'
199
+ when /mac/
200
+ 'mac'
201
+ when /pswindows/
202
+ 'pswindows'
203
+ else
204
+ 'windows'
205
+ end
208
206
  remove_platform_foss_defaults(host, platform)
209
207
  end
210
208
  end
211
-
212
209
  end
213
210
  end
214
211
  end
215
212
  end
216
-