Saltstack Official UFW Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

63 行
1.3KB

  1. <%
  2. distrib, infos = ENV.fetch('DISTRIB', 'debian:stretch/9').split(':')
  3. codename, version = infos.split('/')
  4. %>
  5. ---
  6. driver:
  7. name: docker
  8. use_sudo: false
  9. privileged: true
  10. provisioner:
  11. name: salt_solo
  12. formula: ufw
  13. # Install Salt from official repositories
  14. salt_install: apt
  15. salt_version: latest
  16. salt_apt_repo: https://repo.saltstack.com/apt/<%= distrib %>/<%= version %>/amd64
  17. salt_apt_repo_key: https://repo.saltstack.com/apt/<%= distrib %>/<%= version %>/amd64/latest/SALTSTACK-GPG-KEY.pub
  18. # Don't install Chef
  19. require_chef: false
  20. # Configure Salt
  21. state_top:
  22. base:
  23. '*':
  24. - ufw
  25. pillars:
  26. top.sls:
  27. base:
  28. '*':
  29. - ufw
  30. ufw.sls:
  31. ufw:
  32. enabled: True
  33. settings:
  34. loglevel: 'low'
  35. services:
  36. '22':
  37. protocol: tcp
  38. comment: Allow SSH
  39. platforms:
  40. - name: <%= distrib %>-<%= codename %>
  41. driver_config:
  42. image: "<%= distrib %>:<%= codename %>"
  43. platform: <%= distrib %>
  44. provision_command:
  45. - apt-get update && apt-get install -y locales
  46. - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
  47. - locale-gen en_US.UTF-8
  48. run_command: /lib/systemd/systemd
  49. verifier:
  50. name: inspec
  51. reporter: progress
  52. suites:
  53. - name: ufw