Initial vmtool/ovhtool commit

This commit is contained in:
2016-05-31 00:08:37 +02:00
commit 9d721349c4
10 changed files with 434 additions and 0 deletions

20
templates/network-config Normal file
View File

@@ -0,0 +1,20 @@
---
version: 1
config:
{% for ns in instance.dns.split(' ') %}
- type: nameserver
address: {{ ns }}
{% endfor %}
- type: physical
name: ens3
subnets:
- control: auto
type: static
address: |
{{ instance.ip }}
post-up route add {{ host_ip|ipreplace('254') }} dev ens3
post-up route add default gw {{ host_ip|ipreplace('254') }}
post-down route del {{ host_ip|ipreplace('254') }} dev ens3
post-down route del default gw {{ host_ip|ipreplace('254') }}
netmask: 255.255.255.255
broadcast: {{ instance.ip|ipreplace('1') }}