Initial cloud-init support
authorMichael Prokop <mika@grml.org>
Fri, 3 Apr 2020 14:06:40 +0000 (16:06 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 12 May 2020 14:29:16 +0000 (16:29 +0200)
etc/grml/fai/config/files/etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE [new file with mode: 0644]
etc/grml/fai/config/scripts/GRMLBASE/51-cloud-init [new file with mode: 0755]

diff --git a/etc/grml/fai/config/files/etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE b/etc/grml/fai/config/files/etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE
new file mode 100644 (file)
index 0000000..646e4e2
--- /dev/null
@@ -0,0 +1,28 @@
+# cloud-init configuration for Grml live system.
+#
+# This file was deployed via grml-live's
+# ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/51-cloud-init script, using
+# ${GRML_FAI_CONFIG}/config/files/etc/cloud/cloud.cfg.d/42_grml.cfg/GRMLBASE
+
+system_info:
+   # This will affect which distro class gets used
+   distro: debian
+   # Default user name + that default users groups (if added/used)
+   default_user:
+     name: grml
+     lock_passwd: True
+     gecos: Grml
+     groups: [adm, audio, cdrom, dialout, dip, floppy, netdev, plugdev, sudo, video]
+     sudo: ["ALL=(ALL) NOPASSWD:ALL"]
+     shell: /bin/zsh
+   # Other config here will be given to the distro class and/or path classes
+   paths:
+      cloud_dir: /var/lib/cloud/
+      templates_dir: /etc/cloud/templates/
+      upstart_dir: /etc/init/
+   package_mirrors:
+     - arches: [default]
+       failsafe:
+         primary: http://deb.debian.org/debian
+         security: http://security.debian.org/
+   ssh_svcname: ssh
diff --git a/etc/grml/fai/config/scripts/GRMLBASE/51-cloud-init b/etc/grml/fai/config/scripts/GRMLBASE/51-cloud-init
new file mode 100755 (executable)
index 0000000..017408d
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/51-cloud-init
+# Purpose:       configure cloud-init package
+# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2 or any later version.
+################################################################################
+
+set -u
+set -e
+
+# NOTE: this file is relevant only with cloud-init package installed,
+# though we install it unconditionally via GRMLBASE class to have it
+# available and configured as shipped by Grml ISOs
+fcopy -v /etc/cloud/cloud.cfg.d/42_grml.cfg
+
+## END OF FILE #################################################################
+# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2