forked from saltstack-formulas/shorewall-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.kitchen.yml
88 lines (76 loc) · 1.97 KB
/
.kitchen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<%
distrib, infos = ENV.fetch('DISTRIB', 'debian:stretch/9').split(':')
codename, version = infos.split('/')
%>
---
driver:
name: docker
use_sudo: false
privileged: true
provisioner:
name: salt_solo
formula: shorewall
# Install Salt from official repositories
salt_install: apt
salt_version: latest
salt_apt_repo: https://repo.saltstack.com/apt/<%= distrib %>/<%= version %>/amd64
salt_apt_repo_key: https://repo.saltstack.com/apt/<%= distrib %>/<%= version %>/amd64/latest/SALTSTACK-GPG-KEY.pub
# Don't install Chef
require_chef: false
# Configure Salt
state_top:
base:
'*':
- shorewall
pillars:
top.sls:
base:
'*':
- shorewall
shorewall.sls:
shorewall:
zones:
net:
type: ipv4
interfaces:
eth0:
ipv: 4
broadcast: detect
options: dhcp,tcpflags,logmartians,nosmurfs
policy:
- source: $FW
dest: net
policy: ACCEPT
comment: Allow Firewall to connect to World
- source: net
dest: $FW
policy: ACCEPT
comment: Allow World to connect to Firewall
rules:
ALL:
- action: ACCEPT
source: net
dest: $FW
comment: Allow World to connect to Firewall
- action: ACCEPT
source: $FW
dest: net
comment: Allow Firewall to connect to World
platforms:
- name: <%= distrib %>-<%= codename %>
driver_config:
image: "<%= distrib %>:<%= codename %>"
platform: <%= distrib %>
provision_command:
- apt-get update && apt-get install -y locales && locale-gen en_US.UTF-8
<% if codename == 'wheezy' %>
run_command: /sbin/init
<% else %>
run_command: /lib/systemd/systemd
<% end %>
verifier:
name: inspec
reporter:
- progress
suites:
- name: shorewall