Skip to content

Commit

Permalink
Move to setup_acceptance_node.pp
Browse files Browse the repository at this point in the history
Rather than writing the setup code in Ruby, this is now written in
Puppet. That works better with modulesync. It also switches from the
legacy operatingsystem fact to the modern os.name fact. This is now
easily detectable with puppet-lint.
  • Loading branch information
ekohl committed Jan 6, 2024
1 parent 1b96532 commit 741355f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
15 changes: 15 additions & 0 deletions spec/setup_acceptance_node.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
case $facts['os']['name'] {
'CentOS': {
# Mosquitto is packaged in EPEL
package { 'epel-release':
ensure => installed,
}
}
'Fedora': {
# For serverspec
package { 'iproute':
ensure => installed,
}
}
default: {}
}
9 changes: 1 addition & 8 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,4 @@
# This file is completely managed via modulesync
require 'voxpupuli/acceptance/spec_helper_acceptance'

configure_beaker do |host|
case fact_on(host, 'operatingsystem')
when 'CentOS'
host.install_package('epel-release')
when 'Fedora'
host.install_package('iproute')
end
end
configure_beaker

0 comments on commit 741355f

Please sign in to comment.