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

153 lines
4.0KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. # For help on this file's format, see https://kitchen.ci/
  5. driver:
  6. name: docker
  7. use_sudo: false
  8. privileged: true
  9. run_command: /lib/systemd/systemd
  10. # Make sure the platforms listed below match up with
  11. # the `env.matrix` instances defined in `.travis.yml`
  12. platforms:
  13. ## SALT 2019.2
  14. - name: debian-9-2019-2-py3
  15. driver:
  16. image: netmanagers/salt-2019.2-py3:debian-9
  17. provision_command:
  18. - apt-get update && apt-get install -y locales
  19. - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
  20. - locale-gen en_US.UTF-8
  21. - name: ubuntu-1804-2019-2-py3
  22. driver:
  23. image: netmanagers/salt-2019.2-py3:ubuntu-18.04
  24. - name: centos-7-2019-2-py3
  25. driver:
  26. image: netmanagers/salt-2019.2-py3:centos-7
  27. - name: fedora-29-2019-2-py3
  28. driver:
  29. image: netmanagers/salt-2019.2-py3:fedora-29
  30. - name: opensuse-leap-15-2019-2-py3
  31. driver:
  32. image: netmanagers/salt-2019.2-py3:opensuse-leap-15
  33. run_command: /usr/lib/systemd/systemd
  34. ## SALT 2018.3
  35. - name: debian-9-2018-3-py2
  36. driver:
  37. image: netmanagers/salt-2018.3-py2:debian-9
  38. provision_command:
  39. - apt-get update && apt-get install -y locales
  40. - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
  41. - locale-gen en_US.UTF-8
  42. - name: ubuntu-1604-2018-3-py2
  43. driver:
  44. image: netmanagers/salt-2018.3-py2:ubuntu-16.04
  45. - name: centos-7-2018-3-py2
  46. driver:
  47. image: netmanagers/salt-2018.3-py2:centos-7
  48. - name: fedora-29-2018-3-py2
  49. driver:
  50. image: netmanagers/salt-2018.3-py2:fedora-29
  51. # TODO: Use this when fixed instead of `opensuse-leap-42`
  52. # Ref: https://github.com/netmanagers/salt-image-builder/issues/2
  53. # - name: opensuse-leap-15-2018-3-py2
  54. # driver:
  55. # image: netmanagers/salt-2018.3-py2:opensuse-leap-15
  56. # run_command: /usr/lib/systemd/systemd
  57. - name: opensuse-leap-42-2018-3-py2
  58. driver:
  59. image: netmanagers/salt-2018.3-py2:opensuse-leap-42
  60. run_command: /usr/lib/systemd/systemd
  61. ## SALT 2017.7
  62. - name: debian-8-2017-7-py2
  63. driver:
  64. image: netmanagers/salt-2017.7-py2:debian-8
  65. provision_command:
  66. - apt-get update && apt-get install -y locales
  67. - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
  68. - locale-gen en_US.UTF-8
  69. - name: ubuntu-1604-2017-7-py2
  70. driver:
  71. image: netmanagers/salt-2017.7-py2:ubuntu-16.04
  72. - name: centos-6-2017-7-py2
  73. driver:
  74. image: netmanagers/salt-2017.7-py2:centos-6
  75. run_command: /sbin/init
  76. run_options: -v /lib/modules:/lib/modules:ro
  77. - name: fedora-28-2017-7-py2
  78. driver:
  79. image: netmanagers/salt-2017.7-py2:fedora-28
  80. - name: opensuse-leap-42-2017-7-py2
  81. driver:
  82. image: netmanagers/salt-2017.7-py2:opensuse-leap-42
  83. run_command: /usr/lib/systemd/systemd
  84. provisioner:
  85. name: salt_solo
  86. log_level: info
  87. salt_install: none
  88. require_chef: false
  89. formula: ufw
  90. salt_copy_filter:
  91. - .kitchen
  92. - .git
  93. state_top:
  94. base:
  95. '*':
  96. - ufw
  97. pillars:
  98. top.sls:
  99. base:
  100. '*':
  101. - ufw
  102. ufw.sls:
  103. ufw:
  104. enabled: True
  105. settings:
  106. loglevel: 'low'
  107. applications:
  108. MySQL:
  109. comment: Allow MySQL
  110. Postgresql:
  111. limit: True
  112. comment: Limit Postgresql
  113. SSH223:
  114. deny: True
  115. comment: Deny Webscale SSH
  116. '*':
  117. deny: True
  118. from_addr: 10.0.0.0/8
  119. services:
  120. '*':
  121. deny: True
  122. from_addr:
  123. - 10.0.0.1
  124. - 10.0.0.2
  125. '22':
  126. protocol: tcp
  127. limit: True
  128. comment: Limit SSH
  129. '80':
  130. protocol: tcp
  131. deny: True
  132. comment: Deny HTTP
  133. '443':
  134. protocol: tcp
  135. comment: Allow HTTPS
  136. verifier:
  137. # https://www.inspec.io/
  138. name: inspec
  139. sudo: true
  140. # cli, documentation, html, progress, json, json-min, json-rspec, junit
  141. reporter:
  142. - cli
  143. inspec_tests:
  144. - path: test/integration/default
  145. suites:
  146. - name: default