summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-06-29 03:09:07 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-06-29 03:09:21 +0200
commit0810f9241b1dbbf973e1ca7f69bc8b66a84a5750 (patch)
treeb6974316a1a09edaf2b5a902188d7881f6bf0037
parentmake port 222 ssh default port for chaos at home (diff)
added gnocchi
-rw-r--r--chaos-at-home/ch-gnocci.yml8
-rw-r--r--inventory/group_vars/chaos_at_home/network.yml1
-rw-r--r--inventory/host_vars/ch-gnocchi.yml12
-rw-r--r--inventory/hosts.ini2
-rw-r--r--roles/preseed/templates/preseed_debian-stretch.cfg.j27
-rw-r--r--roles/preseed/templates/preseed_ubuntu-bionic.cfg.j27
-rw-r--r--roles/preseed/templates/preseed_ubuntu-xenial.cfg.j27
7 files changed, 40 insertions, 4 deletions
diff --git a/chaos-at-home/ch-gnocci.yml b/chaos-at-home/ch-gnocci.yml
new file mode 100644
index 00000000..01000c1d
--- /dev/null
+++ b/chaos-at-home/ch-gnocci.yml
@@ -0,0 +1,8 @@
+---
+- name: Basic Setup
+ hosts: ch-gnocchi
+ roles:
+ - role: base
+ - role: sshd
+ - role: zsh
+ - role: vm/host
diff --git a/inventory/group_vars/chaos_at_home/network.yml b/inventory/group_vars/chaos_at_home/network.yml
index 62c04b59..9acb6d26 100644
--- a/inventory/group_vars/chaos_at_home/network.yml
+++ b/inventory/group_vars/chaos_at_home/network.yml
@@ -43,6 +43,7 @@ network_zones:
ch-sw1: 201
ch-ap0: 220
ch-ap1: 221
+ ch-gnocchi: 240
magenta:
vlan: 329
diff --git a/inventory/host_vars/ch-gnocchi.yml b/inventory/host_vars/ch-gnocchi.yml
new file mode 100644
index 00000000..0d4db94f
--- /dev/null
+++ b/inventory/host_vars/ch-gnocchi.yml
@@ -0,0 +1,12 @@
+---
+install_interface: enp3s0
+install_dhcp: true
+
+install:
+ disks:
+ primary: /dev/disk/by-id/ata-Samsung_SSD_860_EVO_mSATA_250GB_S41MNC0KA13977X
+ kernel_cmdline:
+ - console=ttyS0,115200n8
+
+network:
+ domain: spreadspace.org
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index aee7cd03..861af70e 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -20,7 +20,7 @@ atlas ansible_port=22000
keyserver ansible_port=22000
pan ansible_host=ch-pan
mimas2 ansible_host=ch-mimas2
-gnocchi ansible_host=ch-gnocchi
+ch-gnocchi host_name=gnocchi
[chaos_at_home:children]
mz_chaos_at_home
diff --git a/roles/preseed/templates/preseed_debian-stretch.cfg.j2 b/roles/preseed/templates/preseed_debian-stretch.cfg.j2
index 0d44b35f..69b8ff33 100644
--- a/roles/preseed/templates/preseed_debian-stretch.cfg.j2
+++ b/roles/preseed/templates/preseed_debian-stretch.cfg.j2
@@ -9,14 +9,19 @@ d-i keyboard-configuration/xkb-keymap select us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/disable_dhcp boolean true
d-i netcfg/choose_interface select {{ install_interface | default(hostvars[hostname].network_cooked.primary.interface) }}
+{% if install_dhcp is defined and install_dhcp %}
+d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
+{% else %}
+d-i netcfg/disable_dhcp boolean true
+d-i netcfg/disable_autoconfig boolean true
d-i netcfg/get_ipaddress string {{ hostvars[hostname].network_cooked.primary.ip }}
d-i netcfg/get_netmask string {{ hostvars[hostname].network_cooked.primary.mask }}
d-i netcfg/get_gateway string {{ hostvars[hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
+{% endif %}
d-i netcfg/hostname string {{ hostvars[hostname].host_name }}
d-i netcfg/get_hostname string {{ hostvars[hostname].host_name }}
diff --git a/roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2 b/roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2
index 677752b6..fc8cc530 100644
--- a/roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2
+++ b/roles/preseed/templates/preseed_ubuntu-bionic.cfg.j2
@@ -13,14 +13,19 @@ d-i keyboard-configuration/layoutcode string us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/disable_dhcp boolean true
d-i netcfg/choose_interface select {{ install_interface | default(hostvars[hostname].network_cooked.primary.interface) }}
+{% if install_dhcp is defined and install_dhcp %}
+d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
+{% else %}
+d-i netcfg/disable_dhcp boolean true
+d-i netcfg/disable_autoconfig boolean true
d-i netcfg/get_ipaddress string {{ hostvars[hostname].network_cooked.primary.ip }}
d-i netcfg/get_netmask string {{ hostvars[hostname].network_cooked.primary.mask }}
d-i netcfg/get_gateway string {{ hostvars[hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
+{% endif %}
d-i netcfg/hostname string {{ hostvars[hostname].host_name }}
d-i netcfg/get_hostname string {{ hostvars[hostname].host_name }}
diff --git a/roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2 b/roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2
index 7dfd5d97..0b732051 100644
--- a/roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2
+++ b/roles/preseed/templates/preseed_ubuntu-xenial.cfg.j2
@@ -13,14 +13,19 @@ d-i keyboard-configuration/layoutcode string us
d-i hw-detect/load_firmware boolean false
-d-i netcfg/disable_dhcp boolean true
d-i netcfg/choose_interface select {{ install_interface | default(hostvars[hostname].network_cooked.primary.interface) }}
+{% if install_dhcp is defined and install_dhcp %}
+d-i netcfg/disable_dhcp boolean false
d-i netcfg/disable_autoconfig boolean false
+{% else %}
+d-i netcfg/disable_dhcp boolean true
+d-i netcfg/disable_autoconfig boolean true
d-i netcfg/get_ipaddress string {{ hostvars[hostname].network_cooked.primary.ip }}
d-i netcfg/get_netmask string {{ hostvars[hostname].network_cooked.primary.mask }}
d-i netcfg/get_gateway string {{ hostvars[hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
+{% endif %}
d-i netcfg/hostname string {{ hostvars[hostname].host_name }}
d-i netcfg/get_hostname string {{ hostvars[hostname].host_name }}