From 0fe815ffa2f12b06ea3f710a33bacb852d75c770 Mon Sep 17 00:00:00 2001 From: genofire Date: Thu, 17 Sep 2020 15:07:30 +0000 Subject: [PATCH] group_vars: calc debian ip address --- group_vars/debian | 11 +++++++++++ host_vars/cloud.emma.ccchb.de.yml | 7 ++----- host_vars/dn42.emma.ccchb.de.yml | 8 +------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/group_vars/debian b/group_vars/debian index 1fb41f6..bc7ba4f 100644 --- a/group_vars/debian +++ b/group_vars/debian @@ -1,2 +1,13 @@ --- ansible_python_interpreter: /usr/bin/python3.7 + +dns: 213.133.98.98 8.8.8.8 +ipv6_subnet: '2a01:4f8:150:926f::' +ipv4_subnet: 10.0.0.0 + +ipv6: '{{ ipv6_subnet | ipmath(2 * (vm_index +2)+1) }}/127' +ipv6route: '{{ ipv6_subnet | ipmath(2 * (vm_index +2)) }}' + +ansible_ssh_host: '{{ ipv4_subnet | ipmath(2 * vm_index +1) }}' +ipv4: '{{ ipv4_subnet | ipmath(2 * vm_index +1) }}/31' +ipv4route: '{{ ipv4_subnet | ipmath(2 * vm_index) }}' diff --git a/host_vars/cloud.emma.ccchb.de.yml b/host_vars/cloud.emma.ccchb.de.yml index fcef44b..7346f73 100644 --- a/host_vars/cloud.emma.ccchb.de.yml +++ b/host_vars/cloud.emma.ccchb.de.yml @@ -1,8 +1,5 @@ -ipv6: 2a01:4f8:150:926f::5/127 -ipv6route: 2a01:4f8:150:926f::4 -ipv4: 10.0.0.1/31 -ipv4route: 10.0.0.0 -dns: 213.133.98.98 8.8.8.8 +vm_index: 0 + nginx_acme_mail: "webmaster@ccchb.de" nextcloud_domain: "cloud.ccchb.de" php_config: diff --git a/host_vars/dn42.emma.ccchb.de.yml b/host_vars/dn42.emma.ccchb.de.yml index d4cb802..9f4c5c6 100644 --- a/host_vars/dn42.emma.ccchb.de.yml +++ b/host_vars/dn42.emma.ccchb.de.yml @@ -1,10 +1,4 @@ -ansible_ssh_host: 10.0.0.3 - -ipv6: 2a01:4f8:150:926f::7/127 -ipv6route: 2a01:4f8:150:926f::6 -ipv4: 10.0.0.3/31 -ipv4route: 10.0.0.2 -dns: 213.133.98.98 8.8.8.8 +vm_index: 1 user_mgmt: crest: