Saltstack Official Salt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # frozen_string_literal: true
  2. # Prepare platform "finger"
  3. platform_finger = "#{platform[:name]}-#{platform[:release].split('.')[0]}"
  4. version =
  5. case platform[:family]
  6. when 'debian'
  7. '3000.3+ds-1'
  8. when 'redhat'
  9. case platform_finger
  10. when 'centos-8'
  11. '3000.3-1.el8'
  12. when 'centos-7'
  13. '3000.3-1.el7'
  14. when 'amazon-2'
  15. '3000.3-1.amzn2'
  16. end
  17. when 'fedora'
  18. '3000.3-1.fc31'
  19. when 'suse'
  20. # Issue in the upstream repo, should be `3000.3`
  21. case platform[:release]
  22. when /^15.2/
  23. '3000.2-lp152.7.1'
  24. when /^15.1/
  25. '3000.2-lp151.2.1'
  26. end
  27. end
  28. control 'salt packages' do
  29. title 'should be installed'
  30. %w[
  31. salt-master
  32. salt-minion
  33. ].each do |p|
  34. describe package(p) do
  35. it { should be_installed }
  36. its('version') { should eq version }
  37. end
  38. end
  39. end