Browse Source

Fix beaker on xenial

Add a xenial nodeset and update the spec helper to install puppet 3 from
the Ubuntu repos instead of from puppetlabs.

Change-Id: Ie7474c13d43350516ee369b7ba8d28c149beb39e
master
Colleen Murphy 1 year ago
parent
commit
927b83c2b4
2 changed files with 18 additions and 1 deletions
  1. 10
    0
      spec/acceptance/nodesets/nodepool-xenial.yml
  2. 8
    1
      spec/spec_helper_acceptance.rb

+ 10
- 0
spec/acceptance/nodesets/nodepool-xenial.yml View File

@@ -0,0 +1,10 @@
1
+HOSTS:
2
+  ubuntu-16.04-amd64:
3
+    roles:
4
+      - master
5
+    platform: ubuntu-16.04-amd64
6
+    hypervisor: none
7
+    ip: 127.0.0.1
8
+CONFIG:
9
+  type: foss
10
+  set_env: false

+ 8
- 1
spec/spec_helper_acceptance.rb View File

@@ -2,7 +2,14 @@ require 'beaker-rspec'
2 2
 
3 3
 hosts.each do |host|
4 4
 
5
-  install_puppet
5
+  # puppet 3 isn't available from apt.puppetlabs.com so install it from the Xenial repos
6
+  on host, "which apt-get && apt-get install puppet -y", { :acceptable_exit_codes => [0,1] }
7
+  # otherwise use the beaker helpers to install the yum.puppetlabs.com repo and puppet
8
+  r = on host, "which yum",  { :acceptable_exit_codes => [0,1] }
9
+  if r.exit_code == 0
10
+    install_puppet
11
+  end
12
+  add_platform_foss_defaults(host, 'unix')
6 13
 
7 14
   on host, "mkdir -p #{host['distmoduledir']}"
8 15
 end

Loading…
Cancel
Save