Saltstack Official PHP 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.

53 lines
933B

  1. control 'Php package' do
  2. title 'should be installed'
  3. def test_debian
  4. describe package('php-imagick') do
  5. it { should be_installed }
  6. end
  7. describe package('php-redis') do
  8. it { should be_installed }
  9. end
  10. describe package('php-xdebug') do
  11. it { should be_installed }
  12. end
  13. %w[
  14. bz2 cli curl fpm gd imap intl mbstring
  15. mysql readline xml zip
  16. ].each do |pkg|
  17. describe package("php5.6-#{pkg}") do
  18. it { should be_installed }
  19. end
  20. describe package("php7.3-#{pkg}") do
  21. it { should be_installed }
  22. end
  23. end
  24. end
  25. def test_redhat
  26. describe package('php') do
  27. it { should be_installed }
  28. end
  29. end
  30. def test_suse
  31. describe package('php7') do
  32. it { should be_installed }
  33. end
  34. end
  35. case os[:family]
  36. when 'debian'
  37. test_debian
  38. when 'redhat', 'fedora'
  39. test_redhat
  40. when 'suse'
  41. test_suse
  42. end
  43. end