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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/test.yml +28 -7
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +842 -0
- data/CHANGELOG.md +31 -0
- data/Gemfile +5 -20
- data/Rakefile +64 -169
- data/acceptance/config/acceptance-options.rb +3 -3
- data/acceptance/config/gem/acceptance-options.rb +8 -8
- data/acceptance/config/git/acceptance-options.rb +8 -8
- data/acceptance/config/pkg/acceptance-options.rb +7 -7
- data/acceptance/pre_suite/gem/install.rb +6 -6
- data/acceptance/pre_suite/git/install.rb +22 -22
- data/acceptance/pre_suite/pkg/install.rb +3 -3
- data/acceptance/tests/backwards_compatible.rb +6 -7
- data/acceptance/tests/clone_git_repo_on_test.rb +12 -13
- data/acceptance/tests/create_tmpdir_on_test.rb +13 -9
- data/acceptance/tests/install_smoke_test.rb +5 -4
- data/acceptance/tests/stub_host.rb +11 -10
- data/acceptance/tests/web_helpers_test.rb +11 -10
- data/beaker-puppet.gemspec +16 -23
- data/bin/beaker-puppet +2 -4
- data/lib/beaker-puppet/helpers/facter_helpers.rb +9 -7
- data/lib/beaker-puppet/helpers/host_helpers.rb +10 -7
- data/lib/beaker-puppet/helpers/puppet_helpers.rb +151 -160
- data/lib/beaker-puppet/helpers/rake_helpers.rb +1 -1
- data/lib/beaker-puppet/helpers/tk_helpers.rb +22 -28
- data/lib/beaker-puppet/install_utils/aio_defaults.rb +39 -43
- data/lib/beaker-puppet/install_utils/ezbake_utils.rb +34 -42
- data/lib/beaker-puppet/install_utils/foss_defaults.rb +134 -138
- data/lib/beaker-puppet/install_utils/foss_utils.rb +293 -320
- data/lib/beaker-puppet/install_utils/module_utils.rb +58 -70
- data/lib/beaker-puppet/install_utils/puppet5.rb +30 -35
- data/lib/beaker-puppet/install_utils/puppet_utils.rb +58 -68
- data/lib/beaker-puppet/install_utils/windows_utils.rb +34 -36
- data/lib/beaker-puppet/version.rb +1 -1
- data/lib/beaker-puppet/wrappers.rb +13 -14
- data/lib/beaker-puppet.rb +4 -5
- data/setup/aio/010_Install_Puppet_Agent.rb +5 -6
- data/setup/common/000-delete-puppet-when-none.rb +2 -4
- data/setup/common/003_solaris_cert_fix.rb +74 -70
- data/setup/common/005_redhat_subscription_fix.rb +3 -2
- data/setup/common/011_Install_Puppet_Server.rb +7 -9
- data/setup/common/012_Finalize_Installs.rb +5 -5
- data/setup/common/025_StopFirewall.rb +1 -1
- data/setup/common/030_StopSssd.rb +2 -2
- data/setup/common/040_ValidateSignCert.rb +10 -12
- data/setup/common/045_EnsureMasterStarted.rb +2 -2
- data/setup/gem/010_GemInstall.rb +5 -4
- data/setup/git/000_EnvSetup.rb +48 -48
- data/setup/git/010_TestSetup.rb +13 -12
- data/setup/git/020_PuppetUserAndGroup.rb +3 -2
- data/setup/git/060_InstallModules.rb +14 -14
- data/setup/git/070_InstallCACerts.rb +82 -82
- data/spec/beaker-puppet/helpers/facter_helpers_spec.rb +22 -24
- data/spec/beaker-puppet/helpers/host_helpers_spec.rb +10 -6
- data/spec/beaker-puppet/helpers/puppet_helpers_spec.rb +506 -517
- data/spec/beaker-puppet/helpers/tk_helpers_spec.rb +20 -24
- data/spec/beaker-puppet/install_utils/ezbake_utils_spec.rb +86 -90
- data/spec/beaker-puppet/install_utils/foss_utils_spec.rb +636 -599
- data/spec/beaker-puppet/install_utils/module_utils_spec.rb +125 -116
- data/spec/beaker-puppet/install_utils/puppet5_spec.rb +159 -165
- data/spec/beaker-puppet/install_utils/puppet_utils_spec.rb +92 -77
- data/spec/beaker-puppet/install_utils/windows_utils_spec.rb +101 -89
- data/spec/beaker-puppet/wrappers_spec.rb +10 -10
- data/spec/helpers.rb +85 -91
- data/tasks/ci.rake +171 -179
- metadata +33 -62
- data/setup/common/020_InstallCumulusModules.rb +0 -13
- data/setup/common/021_InstallAristaModuleMasters.rb +0 -12
- 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
|
-
:
|
12
|
-
:
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
20
|
-
:
|
21
|
-
:
|
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'
|
30
|
-
'puppetpath'
|
31
|
-
'puppetvardir'
|
32
|
-
'puppetbin'
|
33
|
-
'puppetbindir'
|
34
|
-
'hieralibdir'
|
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'
|
37
|
-
'hieradatadir'
|
38
|
-
'hieraconf'
|
39
|
-
'distmoduledir'
|
40
|
-
'sitemoduledir'
|
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'
|
45
|
-
'puppetpath'
|
46
|
-
'puppetvardir'
|
47
|
-
'puppetbin'
|
48
|
-
'puppetbindir'
|
49
|
-
'hieralibdir'
|
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'
|
52
|
-
'hieradatadir'
|
53
|
-
'hieraconf'
|
54
|
-
'distmoduledir'
|
55
|
-
'sitemoduledir'
|
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'
|
60
|
-
'puppetpath'
|
61
|
-
'puppetconfdir'
|
62
|
-
'puppetcodedir'
|
63
|
-
'puppetvardir'
|
64
|
-
'puppetbin'
|
65
|
-
'puppetbindir'
|
66
|
-
'hieralibdir'
|
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'
|
69
|
-
'hieradatadir'
|
70
|
-
'hieraconf'
|
71
|
-
'distmoduledir'
|
72
|
-
'sitemoduledir'
|
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'
|
77
|
-
'puppetpath'
|
78
|
-
'puppetconfdir'
|
79
|
-
'puppetvardir'
|
80
|
-
'puppetbin'
|
81
|
-
'puppetbindir'
|
82
|
-
'privatebindir'
|
83
|
-
'hieralibdir'
|
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'
|
86
|
-
'hieradatadir'
|
87
|
-
'hieraconf'
|
88
|
-
'distmoduledir'
|
89
|
-
'sitemoduledir'
|
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'
|
94
|
-
'puppetpath'
|
95
|
-
'puppetconfdir'
|
96
|
-
'puppetvardir'
|
97
|
-
'puppetbin'
|
98
|
-
'puppetbindir'
|
99
|
-
'privatebindir'
|
100
|
-
'hieralibdir'
|
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'
|
103
|
-
'hieradatadir'
|
104
|
-
'hieraconf'
|
105
|
-
'distmoduledir'
|
106
|
-
'sitemoduledir'
|
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'
|
110
|
-
'puppetconfdir'
|
111
|
-
'puppetcodedir'
|
112
|
-
'hieraconf'
|
113
|
-
'puppetvardir'
|
114
|
-
'distmoduledir'
|
115
|
-
'sitemoduledir'
|
116
|
-
'hieralibdir'
|
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'
|
120
|
-
'privatebindir'
|
121
|
-
'hierabindir'
|
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'
|
125
|
-
'sitemoduledir'
|
126
|
-
'hieralibdir'
|
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'
|
129
|
-
'puppetpath'
|
130
|
-
'hieraconf'
|
131
|
-
'puppetvardir'
|
132
|
-
'puppetbindir'
|
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
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
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 |
|
158
|
-
case host.class.to_s.downcase
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
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 |
|
194
|
-
case host.class.to_s.downcase
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
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
|
-
|