summaryrefslogtreecommitdiffstats
path: root/mcp/salt-formulas/maas
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-08-17 16:40:38 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-17 16:40:38 +0000
commitdc0e2355b21ab954456c9db7af1161359c966d57 (patch)
tree76da165eccda65852338f1647c8f5ad92aa53e07 /mcp/salt-formulas/maas
parent7b217895f7b379d396a9bac9a87590be832dc1cf (diff)
parent5039d069265df15ed3d8e41f7a1c7f9457a9d58a (diff)
Merge "Bring in baremetal support"
Diffstat (limited to 'mcp/salt-formulas/maas')
-rw-r--r--mcp/salt-formulas/maas/pxe_nat.sls30
1 files changed, 30 insertions, 0 deletions
diff --git a/mcp/salt-formulas/maas/pxe_nat.sls b/mcp/salt-formulas/maas/pxe_nat.sls
new file mode 100644
index 000000000..e70efaf9d
--- /dev/null
+++ b/mcp/salt-formulas/maas/pxe_nat.sls
@@ -0,0 +1,30 @@
+net.ipv4.ip_forward:
+ sysctl.present:
+ - value: 1
+
+iptables_pxe_nat:
+ iptables.append:
+ - table: nat
+ - chain: POSTROUTING
+ - jump: MASQUERADE
+ - destination: 0/0
+ - source: {{ salt['pillar.get']('_param:single_address') }}/24
+ - save: True
+
+iptables_pxe_source:
+ iptables.append:
+ - table: filter
+ - chain: INPUT
+ - jump: ACCEPT
+ - destination: 0/0
+ - source: {{ salt['pillar.get']('_param:single_address') }}/24
+ - save: True
+
+iptables_pxe_destination:
+ iptables.append:
+ - table: filter
+ - chain: INPUT
+ - jump: ACCEPT
+ - destination: {{ salt['pillar.get']('_param:single_address') }}/24
+ - source: 0/0
+ - save: True