summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/configs/modules
diff options
context:
space:
mode:
authorWesley Wiedenmeier <wesley.wiedenmeier@gmail.com>2016-12-22 17:27:37 -0500
committerScott Moser <smoser@brickies.net>2016-12-22 17:41:39 -0500
commitf53fc46aa732e3b29991b3e5e39da31a722945ee (patch)
treea301733aa9991b58b218f61b187240d275e44968 /tests/cloud_tests/configs/modules
parentb2a9f33616c806ae6e052520a8589113308f567c (diff)
downloadvyos-cloud-init-f53fc46aa732e3b29991b3e5e39da31a722945ee.tar.gz
vyos-cloud-init-f53fc46aa732e3b29991b3e5e39da31a722945ee.zip
integration test: initial commit of integration test framework
The adds in end-to-end testing of cloud-init. The framework utilizes LXD and cloud images as a backend to test user-data passed in. Arbitrary data is then captured from predefined commands specified by the user. After collection, data verification is completed by running a series of Python unit tests against the collected data. Currently only the Ubuntu Trusty, Xenial, Yakkety, and Zesty releases are supported. Test cases for 50% of the modules is complete and available. Additionally a Read the Docs file was created to guide test writing and execution.
Diffstat (limited to 'tests/cloud_tests/configs/modules')
-rw-r--r--tests/cloud_tests/configs/modules/README.md12
-rw-r--r--tests/cloud_tests/configs/modules/TODO.md100
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_conf.yaml19
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_disable_suites.yaml17
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_primary.yaml19
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_proxy.yaml16
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_security.yaml15
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_sources_key.yaml47
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml20
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_sources_list.yaml19
-rw-r--r--tests/cloud_tests/configs/modules/apt_configure_sources_ppa.yaml20
-rw-r--r--tests/cloud_tests/configs/modules/apt_pipelining_disable.yaml13
-rw-r--r--tests/cloud_tests/configs/modules/apt_pipelining_os.yaml13
-rw-r--r--tests/cloud_tests/configs/modules/bootcmd.yaml13
-rw-r--r--tests/cloud_tests/configs/modules/byobu.yaml18
-rw-r--r--tests/cloud_tests/configs/modules/ca_certs.yaml52
-rw-r--r--tests/cloud_tests/configs/modules/debug_disable.yaml9
-rw-r--r--tests/cloud_tests/configs/modules/debug_enable.yaml9
-rw-r--r--tests/cloud_tests/configs/modules/final_message.yaml13
-rw-r--r--tests/cloud_tests/configs/modules/keys_to_console.yaml13
-rw-r--r--tests/cloud_tests/configs/modules/landscape.yaml26
-rw-r--r--tests/cloud_tests/configs/modules/locale.yaml19
-rw-r--r--tests/cloud_tests/configs/modules/lxd_bridge.yaml30
-rw-r--r--tests/cloud_tests/configs/modules/lxd_dir.yaml17
-rw-r--r--tests/cloud_tests/configs/modules/ntp.yaml20
-rw-r--r--tests/cloud_tests/configs/modules/ntp_pools.yaml23
-rw-r--r--tests/cloud_tests/configs/modules/ntp_servers.yaml20
-rw-r--r--tests/cloud_tests/configs/modules/package_update_upgrade_install.yaml22
-rw-r--r--tests/cloud_tests/configs/modules/runcmd.yaml13
-rw-r--r--tests/cloud_tests/configs/modules/salt_minion.yaml34
-rw-r--r--tests/cloud_tests/configs/modules/seed_random_command.yaml18
-rw-r--r--tests/cloud_tests/configs/modules/seed_random_data.yaml15
-rw-r--r--tests/cloud_tests/configs/modules/set_hostname.yaml18
-rw-r--r--tests/cloud_tests/configs/modules/set_hostname_fqdn.yaml20
-rw-r--r--tests/cloud_tests/configs/modules/set_password.yaml17
-rw-r--r--tests/cloud_tests/configs/modules/set_password_expire.yaml28
-rw-r--r--tests/cloud_tests/configs/modules/set_password_list.yaml33
-rw-r--r--tests/cloud_tests/configs/modules/snappy.yaml13
-rw-r--r--tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_disable.yaml13
-rw-r--r--tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_enable.yaml16
-rw-r--r--tests/cloud_tests/configs/modules/ssh_import_id.yaml14
-rw-r--r--tests/cloud_tests/configs/modules/ssh_keys_generate.yaml42
-rw-r--r--tests/cloud_tests/configs/modules/ssh_keys_provided.yaml102
-rw-r--r--tests/cloud_tests/configs/modules/timezone.yaml12
-rw-r--r--tests/cloud_tests/configs/modules/user_groups.yaml50
-rw-r--r--tests/cloud_tests/configs/modules/write_files.yaml42
46 files changed, 1134 insertions, 0 deletions
diff --git a/tests/cloud_tests/configs/modules/README.md b/tests/cloud_tests/configs/modules/README.md
new file mode 100644
index 00000000..d66101f2
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/README.md
@@ -0,0 +1,12 @@
+# Module Test Configs
+
+## Purpose
+Test functionality of cloud config modules. See
+[here](https://cloudinit.readthedocs.io/en/latest/topics/modules.html) for
+a full list.
+
+## Structure
+Should have one or more test configs for each module in cloudinit/config/. The
+name of the test should indicate which module the config is verifying.
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/TODO.md b/tests/cloud_tests/configs/modules/TODO.md
new file mode 100644
index 00000000..d496da95
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/TODO.md
@@ -0,0 +1,100 @@
+# TODO
+
+The following lists complete or partially misisng modules. If a module is
+listed with nothing below it indicates that no work is completed on that
+module. If there is a list below the module name that is the remainig
+identified work.
+
+## apt_configure
+
+ * apt_get_wrapper
+ * What does this do? How to use it?
+ * apt_get_command
+ * To specify a different 'apt-get' command, set 'apt_get_command'.
+ This must be a list, and the subcommand (update, upgrade) is appended to it.
+ * Modify default and verify the options got passed correctly.
+ * preserve sources
+ * TBD
+
+## chef
+2016-11-17: Tests took > 60 seconds and test framework times out currently.
+
+## disable EC2 metadata
+
+## disk setup
+
+## emit upstart
+
+## fan
+
+## growpart
+
+## grub dpkg
+
+## landscape
+2016-11-17: Module is not working
+
+## lxd
+2016-11-17: Need a zfs backed test written
+
+## mcollective
+
+## migrator
+
+## mounts
+
+## phone home
+
+## power state change
+
+## puppet
+2016-11-17: Tests took > 60 seconds and test framework times out currently.
+
+## resizefs
+
+## resolv conf
+2016-11-17: Issues with changing resolv.conf and lxc backend.
+
+## redhat subscription
+2016-11-17: Need RH support in test framework.
+
+## rightscale userdata
+2016-11-17: Specific to RightScale cloud enviornment.
+
+## rsyslog
+
+## scripts per boot
+Not applicable to write a test for this as it specifies when something should be run.
+
+## scripts per instance
+Not applicable to write a test for this as it specifies when something should be run.
+
+## scripts per once
+Not applicable to write a test for this as it specifies when something should be run.
+
+## scripts user
+Not applicable to write a test for this as it specifies when something should be run.
+
+## scripts vendor
+Not applicable to write a test for this as it specifies when something should be run.
+
+## snappy
+2016-11-17: Need test to install snaps from store
+
+## snap-config
+2016-11-17: Need to investigate
+
+## spacewalk
+
+## ssh authkey fingerprints
+The authkey_hash key does not appear to work. In fact the default claims to be md5, however syslog only shows sha256
+
+## ubuntu init switch
+
+## update etc hosts
+2016-11-17: Issues with changing /etc/hosts and lxc backend.
+
+## yum add repo
+2016-11-17: Need RH support in test framework.
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_conf.yaml b/tests/cloud_tests/configs/modules/apt_configure_conf.yaml
new file mode 100644
index 00000000..163ae3fc
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_conf.yaml
@@ -0,0 +1,19 @@
+#
+# Provide a configuration for APT
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ conf: |
+ APT {
+ Get {
+ Assume-Yes "true";
+ Fix-Broken "true";
+ }
+ }
+collect_scripts:
+ 94cloud-init-config: |
+ #!/bin/bash
+ cat /etc/apt/apt.conf.d/94cloud-init-config
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_disable_suites.yaml b/tests/cloud_tests/configs/modules/apt_configure_disable_suites.yaml
new file mode 100644
index 00000000..73e4a538
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_disable_suites.yaml
@@ -0,0 +1,17 @@
+#
+# Disables everything in sources.list
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ disable_suites:
+ - $RELEASE
+ - $RELEASE-updates
+ - $RELEASE-backports
+ - $RELEASE-security
+collect_scripts:
+ sources.list: |
+ #!/bin/bash
+ grep -v '^#' /etc/apt/sources.list | sed '/^\s*$/d'
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_primary.yaml b/tests/cloud_tests/configs/modules/apt_configure_primary.yaml
new file mode 100644
index 00000000..2ec30ca1
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_primary.yaml
@@ -0,0 +1,19 @@
+#
+# Setup a custome primary sources.list
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ primary:
+ - arches:
+ - default
+ uri: "http://www.gtlib.gatech.edu/pub/ubuntu-releases/"
+collect_scripts:
+ ubuntu.sources.list: |
+ #!/bin/bash
+ grep -v '^#' /etc/apt/sources.list | sed '/^\s*$/d' | grep -c archive.ubuntu.com
+ gatech.sources.list: |
+ #!/bin/bash
+ grep -v '^#' /etc/apt/sources.list | sed '/^\s*$/d' | grep -c gtlib.gatech.edu
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_proxy.yaml b/tests/cloud_tests/configs/modules/apt_configure_proxy.yaml
new file mode 100644
index 00000000..e7371305
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_proxy.yaml
@@ -0,0 +1,16 @@
+#
+# Set apt proxy
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ proxy: "http://squid.internal:3128"
+ http_proxy: "http://squid.internal:3128"
+ ftp_proxy: "ftp://squid.internal:3128"
+ https_proxy: "https://squid.internal:3128"
+collect_scripts:
+ 90cloud-init-aptproxy: |
+ #!/bin/bash
+ cat /etc/apt/apt.conf.d/90cloud-init-aptproxy
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_security.yaml b/tests/cloud_tests/configs/modules/apt_configure_security.yaml
new file mode 100644
index 00000000..f6a2c828
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_security.yaml
@@ -0,0 +1,15 @@
+#
+# Add security to sources.list
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ security:
+ - arches:
+ - default
+collect_scripts:
+ sources.list: |
+ #!/bin/bash
+ grep -c security.ubuntu.com /etc/apt/sources.list
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_sources_key.yaml b/tests/cloud_tests/configs/modules/apt_configure_sources_key.yaml
new file mode 100644
index 00000000..e7568a6a
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_sources_key.yaml
@@ -0,0 +1,47 @@
+#
+# Add a sources.list entry with a given key (Debian Jessie)
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ sources:
+ source1:
+ source: "deb http://ppa.launchpad.net/cloud-init-dev/test-archive/ubuntu $RELEASE main"
+ key: |
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
+ Version: SKS 1.1.6
+ Comment: Hostname: keyserver.ubuntu.com
+
+ mQINBFbZRUIBEAC+A0PIKYBP9kLC4hQtRrffRS11uLo8/BdtmOdrlW0hpPHzCfKnjR3tvSEI
+ lqPHG1QrrjAXKZDnZMRz+h/px7lUztvytGzHPSJd5ARUzAyjyRezUhoJ3VSCxrPqx62avuWf
+ RfoJaIeHfDehL5/dTVkyiWxfVZ369ZX6JN2AgLsQTeybTQ75+2z0xPrrhnGmgh6g0qTYcAaq
+ M5ONOGiqeSBX/Smjh6ALy5XkhUiFGLsI7Yluf6XSICY/x7gd6RAfgSIQrUTNMoS1sqhT4aot
+ +xvOfQy8ySkfAK4NddXql6E/+ZqTmBY/Lr0YklFBy8jGT+UysfiIznPMIwbmgq5Li7BtDDtX
+ b8Uyi4edPpjtextezfXYn4NVIpPL5dPZS/FXh4HpzyH0pYCfrH4QDGA7i52AGmhpiOFjJMo6
+ N33sdjZHOH/2Vyp+QZaQnsdUAi1N4M6c33tQbpIScn1SY+El8z5JDA4PBzkw8HpLCi1gGoa6
+ V4kfbWqXXbGAJF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Y BLOCK-----
+collect_scripts:
+ sources.list: |
+ #!/bin/bash
+ cat /etc/apt/sources.list.d/source1.list
+ apt_key_list: |
+ #!/bin/bash
+ apt-key finger
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml b/tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml
new file mode 100644
index 00000000..1a4a238f
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml
@@ -0,0 +1,20 @@
+#
+# Add a sources.list entry with a key from a keyserver
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ sources:
+ source1:
+ keyid: 0165013E
+ keyserver: keyserver.ubuntu.com
+ source: "deb http://ppa.launchpad.net/cloud-init-dev/test-archive/ubuntu $RELEASE main"
+collect_scripts:
+ sources.list: |
+ #!/bin/bash
+ cat /etc/apt/sources.list.d/source1.list
+ apt_key_list: |
+ #!/bin/bash
+ apt-key finger
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_sources_list.yaml b/tests/cloud_tests/configs/modules/apt_configure_sources_list.yaml
new file mode 100644
index 00000000..057fc72c
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_sources_list.yaml
@@ -0,0 +1,19 @@
+#
+# Generate a sources.list
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ sources_list: |
+ deb $MIRROR $RELEASE main restricted
+ deb-src $MIRROR $RELEASE main restricted
+ deb $PRIMARY $RELEASE universe restricted
+ deb-src $PRIMARY $RELEASE universe restricted
+ deb $SECURITY $RELEASE-security multiverse
+ deb-src $SECURITY $RELEASE-security multiverse
+collect_scripts:
+ sources.list: |
+ #/bin/bash
+ cat /etc/apt/sources.list
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_configure_sources_ppa.yaml b/tests/cloud_tests/configs/modules/apt_configure_sources_ppa.yaml
new file mode 100644
index 00000000..dee9dc70
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_configure_sources_ppa.yaml
@@ -0,0 +1,20 @@
+#
+# Add a PPA to source.list
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ sources:
+ source1:
+ keyid: 0165013E
+ keyserver: keyserver.ubuntu.com
+ source: "ppa:curtin-dev/test-archive"
+collect_scripts:
+ sources.list: |
+ #!/bin/bash
+ cat /etc/apt/sources.list.d/curtin-dev-ubuntu-test-archive-*.list
+ apt-key: |
+ #!/bin/bash
+ apt-key finger
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_pipelining_disable.yaml b/tests/cloud_tests/configs/modules/apt_pipelining_disable.yaml
new file mode 100644
index 00000000..5fa0cee9
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_pipelining_disable.yaml
@@ -0,0 +1,13 @@
+#
+# Disable apt pipelining value
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ apt_pipelining: false
+collect_scripts:
+ 90cloud-init-pipelining: |
+ #!/bin/bash
+ cat /etc/apt/apt.conf.d/90cloud-init-pipelining
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/apt_pipelining_os.yaml b/tests/cloud_tests/configs/modules/apt_pipelining_os.yaml
new file mode 100644
index 00000000..87d183e7
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/apt_pipelining_os.yaml
@@ -0,0 +1,13 @@
+#
+# Set apt pipelining value to OS
+#
+cloud_config: |
+ #cloud-config
+ apt:
+ apt_pipelining: os
+collect_scripts:
+ 90cloud-init-pipelining: |
+ #!/bin/bash
+ cat /etc/apt/apt.conf.d/90cloud-init-pipelining
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/bootcmd.yaml b/tests/cloud_tests/configs/modules/bootcmd.yaml
new file mode 100644
index 00000000..3a73994e
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/bootcmd.yaml
@@ -0,0 +1,13 @@
+#
+# Early boot command
+#
+cloud_config: |
+ #cloud-config
+ bootcmd:
+ - echo 192.168.1.130 us.archive.ubuntu.com > /etc/hosts
+collect_scripts:
+ hosts: |
+ #!/bin/bash
+ cat /etc/hosts
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/byobu.yaml b/tests/cloud_tests/configs/modules/byobu.yaml
new file mode 100644
index 00000000..fd648c77
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/byobu.yaml
@@ -0,0 +1,18 @@
+#
+# Install and enable byobu system wide and default user
+#
+cloud_config: |
+ #cloud-config
+ byobu_by_default: enable
+collect_scripts:
+ byobu_installed: |
+ #!/bin/bash
+ which byobu
+ byobu_profile_enabled: |
+ #!/bin/bash
+ ls /etc/profile.d/Z97-byobu.sh
+ byobu_launch_exists: |
+ #!/bin/bash
+ which /usr/bin/byobu-launch
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ca_certs.yaml b/tests/cloud_tests/configs/modules/ca_certs.yaml
new file mode 100644
index 00000000..d939f435
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ca_certs.yaml
@@ -0,0 +1,52 @@
+#
+# Remove existing ca_certs and install custom ca-cert
+#
+cloud_config: |
+ #cloud-config
+ ca-certs:
+ remove-defaults: true
+ trusted:
+ - |
+ -----BEGIN CERTIFICATE-----
+ MIIGJzCCBA+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBsjELMAkGA1UEBhMCRlIx
+ DzANBgNVBAgMBkFsc2FjZTETMBEGA1UEBwwKU3RyYXNib3VyZzEYMBYGA1UECgwP
+ d3d3LmZyZWVsYW4ub3JnMRAwDgYDVQQLDAdmcmVlbGFuMS0wKwYDVQQDDCRGcmVl
+ bGFuIFNhbXBsZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxIjAgBgkqhkiG9w0BCQEW
+ E2NvbnRhY3RAZnJlZWxhbi5vcmcwHhcNMTIwNDI3MTAzMTE4WhcNMjIwNDI1MTAz
+ MTE4WjB+MQswCQYDVQQGEwJGUjEPMA0GA1UECAwGQWxzYWN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NsLT0+KV14uGw+quK7Lh5sh/JTMA0GCSqGSIb3
+ DQEBBQUAA4ICAQAT5wJFPqervbja5+90iKxi1d0QVtVGB+z6aoAMuWK+qgi0vgvr
+ mu9ot2lvTSCSnRhjeiP0SIdqFMORmBtOCFk/kYDp9M/91b+vS+S9eAlxrNCB5VOf
+ PqxEPp/wv1rBcE4GBO/c6HcFon3F+oBYCsUQbZDKSSZxhDm3mj7pb67FNbZbJIzJ
+ 70HDsRe2O04oiTx+h6g6pW3cOQMgIAvFgKN5Ex727K4230B0NIdGkzuj4KSML0NM
+ slSAcXZ41OoSKNjy44BVEZv0ZdxTDrRM4EwJtNyggFzmtTuV02nkUj1bYYYC5f0L
+ ADr6s0XMyaNk8twlWYlYDZ5uKDpVRVBfiGcq0uJIzIvemhuTrofh8pBQQNkPRDFT
+ Rq1iTo1Ihhl3/Fl1kXk1WR3jTjNb4jHX7lIoXwpwp767HAPKGhjQ9cFbnHMEtkro
+ RlJYdtRq5mccDtwT0GFyoJLLBZdHHMHJz0F9H7FNk2tTQQMhK5MVYwg+LIaee586
+ CQVqfbscp7evlgjLW98H+5zylRHAgoH2G79aHljNKMp9BOuq6SnEglEsiWGVtu2l
+ hnx8SB3sVJZHeer8f/UQQwqbAO+Kdy70NmbSaqaVtp8jOxLiidWkwSyRTsuU6D8i
+ DiH5uEqBXExjrj0FslxcVKdVj5glVcSmkLwZKbEU1OKwleT/iXFhvooWhQ==
+ -----END CERTIFICATE-----
+collect_scripts:
+ cert_count: |
+ #!/bin/bash
+ ls -l /etc/ssl/certs | wc -l
+ cert: |
+ #!/bin/bash
+ md5sum /etc/ssl/certs/ca-certificates.crt
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/debug_disable.yaml b/tests/cloud_tests/configs/modules/debug_disable.yaml
new file mode 100644
index 00000000..63218b18
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/debug_disable.yaml
@@ -0,0 +1,9 @@
+#
+# Do not run in debug mode
+#
+cloud_config: |
+ #cloud-config
+ debug:
+ verbose: False
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/debug_enable.yaml b/tests/cloud_tests/configs/modules/debug_enable.yaml
new file mode 100644
index 00000000..d44147db
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/debug_enable.yaml
@@ -0,0 +1,9 @@
+#
+# Run in debug mode
+#
+cloud_config: |
+ #cloud-config
+ debug:
+ verbose: True
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/final_message.yaml b/tests/cloud_tests/configs/modules/final_message.yaml
new file mode 100644
index 00000000..c9ed6118
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/final_message.yaml
@@ -0,0 +1,13 @@
+#
+# Print a final message with various predefined variables
+#
+cloud_config: |
+ #cloud-config
+ final_message: |
+ This is my final message!
+ $version
+ $timestamp
+ $datasource
+ $uptime
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/keys_to_console.yaml b/tests/cloud_tests/configs/modules/keys_to_console.yaml
new file mode 100644
index 00000000..a90e42c1
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/keys_to_console.yaml
@@ -0,0 +1,13 @@
+#
+# Hide printing of ssh key and fingerprints for specific keys
+#
+cloud_config: |
+ #cloud-config
+ ssh_fp_console_blacklist: [ssh-dss, ssh-dsa, ecdsa-sha2-nistp256]
+ ssh_key_console_blacklist: [ssh-dss, ssh-dsa, ecdsa-sha2-nistp256]
+collect_scripts:
+ syslog: |
+ #!/bin/bash
+ cat /var/log/syslog
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/landscape.yaml b/tests/cloud_tests/configs/modules/landscape.yaml
new file mode 100644
index 00000000..e6f4955a
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/landscape.yaml
@@ -0,0 +1,26 @@
+#
+# Setup landscape client settings
+#
+# 2016-11-17: Disabled due to this not working
+#
+enabled: false
+cloud_config: |
+ #cloud-conifg
+ landscape:
+ client:
+ log_level: "info"
+ url: "https://landscape.canonical.com/message-system"
+ ping_url: "http://landscape.canonical.com/ping"
+ data_path: "/var/lib/landscape/client"
+ http_proxy: "http://my.proxy.com/foobar"
+ https_proxy: "https://my.proxy.com/foobar"
+ tags: "server,cloud"
+ computer_title: "footitle"
+ registration_key: "fookey"
+ account_name: "fooaccount"
+collect_scripts:
+ client.conf: |
+ #!/bin/bash
+ cat /etc/landscape/client.conf
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/locale.yaml b/tests/cloud_tests/configs/modules/locale.yaml
new file mode 100644
index 00000000..af5ad636
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/locale.yaml
@@ -0,0 +1,19 @@
+#
+# Set locale to non-default option and verify
+#
+cloud_config: |
+ #cloud-config
+ locale: en_GB.UTF-8
+ locale_configfile: /etc/default/locale
+collect_scripts:
+ locale_default: |
+ #!/bin/bash
+ cat /etc/default/locale
+ locale_a: |
+ #!/bin/bash
+ locale -a
+ locale_gen: |
+ #!/bin/bash
+ cat /etc/locale.gen | grep -v '^#' | uniq
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/lxd_bridge.yaml b/tests/cloud_tests/configs/modules/lxd_bridge.yaml
new file mode 100644
index 00000000..568bb700
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/lxd_bridge.yaml
@@ -0,0 +1,30 @@
+#
+# LXD configured with directory backend and IPv4 bridge
+#
+cloud_config: |
+ #cloud-config
+ lxd:
+ init:
+ storage_backend: dir
+ bridge:
+ mode: new
+ name: lxdbr0
+ ipv4_address: 10.100.100.1
+ ipv4_netmask: 24
+ ipv4_dhcp_first: 10.100.100.100
+ ipv4_dhcp_last: 10.100.100.200
+ ipv4_nat: true
+ domain: lxd
+collect_scripts:
+ lxc: |
+ #!/bin/bash
+ which lxc
+ lxd: |
+ #!/bin/bash
+ which lxd
+ lxc-bridge: |
+ #!/bin/bash
+ ip addr show lxdbr0
+ cat /etc/default/lxd-bridge 2>/dev/null | grep -v ^# | sort -u
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/lxd_dir.yaml b/tests/cloud_tests/configs/modules/lxd_dir.yaml
new file mode 100644
index 00000000..99b92195
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/lxd_dir.yaml
@@ -0,0 +1,17 @@
+#
+# LXD configured with directory backend
+#
+cloud_config: |
+ #cloud-config
+ lxd:
+ init:
+ storage_backend: dir
+collect_scripts:
+ lxc: |
+ #!/bin/bash
+ which lxc
+ lxd: |
+ #!/bin/bash
+ which lxd
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ntp.yaml b/tests/cloud_tests/configs/modules/ntp.yaml
new file mode 100644
index 00000000..d0941578
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ntp.yaml
@@ -0,0 +1,20 @@
+#
+# Emtpy NTP config to setup using defaults
+#
+cloud_config: |
+ #cloud-config
+ ntp:
+ pools: {}
+ servers: {}
+collect_scripts:
+ ntp_installed_empty: |
+ #!/bin/bash
+ dpkg -l | grep ntp | wc -l
+ ntp_conf_dist_empty: |
+ #!/bin/bash
+ ls /etc/ntp.conf.dist | wc -l
+ ntp_conf_empty: |
+ #!/bin/bash
+ grep '^pool' /etc/ntp.conf
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ntp_pools.yaml b/tests/cloud_tests/configs/modules/ntp_pools.yaml
new file mode 100644
index 00000000..bd0ac292
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ntp_pools.yaml
@@ -0,0 +1,23 @@
+#
+# NTP config using specific pools
+#
+cloud_config: |
+ #cloud-config
+ ntp:
+ pools:
+ - 0.pool.ntp.org
+ - 1.pool.ntp.org
+ - 2.pool.ntp.org
+ - 3.pool.ntp.org
+collect_scripts:
+ ntp_installed_pools: |
+ #!/bin/bash
+ dpkg -l | grep ntp | wc -l
+ ntp_conf_dist_pools: |
+ #!/bin/bash
+ ls /etc/ntp.conf.dist | wc -l
+ ntp_conf_pools: |
+ #!/bin/bash
+ grep '^pool' /etc/ntp.conf
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ntp_servers.yaml b/tests/cloud_tests/configs/modules/ntp_servers.yaml
new file mode 100644
index 00000000..934b9c5d
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ntp_servers.yaml
@@ -0,0 +1,20 @@
+#
+# NTP config using specific servers
+#
+cloud_config: |
+ #cloud-config
+ ntp:
+ servers:
+ - pool.ntp.org
+collect_scripts:
+ ntp_installed_servers: |
+ #!/bin/bash
+ dpkg -l | grep ntp | wc -l
+ ntp_conf_dist_servers: |
+ #!/bin/bash
+ ls /etc/ntp.conf.dist | wc -l
+ ntp_conf_servers: |
+ #!/bin/bash
+ grep '^server' /etc/ntp.conf
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/package_update_upgrade_install.yaml b/tests/cloud_tests/configs/modules/package_update_upgrade_install.yaml
new file mode 100644
index 00000000..d027d540
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/package_update_upgrade_install.yaml
@@ -0,0 +1,22 @@
+#
+# Update/upgrade via apt and then install a pair of packages
+#
+cloud_config: |
+ #cloud-config
+ packages:
+ - htop
+ - tree
+ package_update: true
+ package_upgrade: true
+collect_scripts:
+ apt_history_cmdline: |
+ #!/bin/bash
+ grep ^Commandline: /var/log/apt/history.log
+ dpkg_htop: |
+ #!/bin/bash
+ dpkg -l | grep htop | wc -l
+ dpkg_tree: |
+ #!/bin/bash
+ dpkg -l | grep tree | wc -l
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/runcmd.yaml b/tests/cloud_tests/configs/modules/runcmd.yaml
new file mode 100644
index 00000000..04e5a050
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/runcmd.yaml
@@ -0,0 +1,13 @@
+#
+# Run a simple command
+#
+cloud_config: |
+ #cloud-config
+ runcmd:
+ - echo cloud-init run cmd test > /tmp/run_cmd
+collect_scripts:
+ run_cmd: |
+ #!/bin/bash
+ cat /tmp/run_cmd
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/salt_minion.yaml b/tests/cloud_tests/configs/modules/salt_minion.yaml
new file mode 100644
index 00000000..f20d24f0
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/salt_minion.yaml
@@ -0,0 +1,34 @@
+#
+# Create config for a salt minion
+#
+# 2016-11-17: Currently takes >60 seconds results in test failure
+#
+enabled: False
+cloud_config: |
+ #cloud-config
+ salt_minion:
+ conf:
+ master: salt.mydomain.com
+ public_key: |
+ ------BEGIN PUBLIC KEY-------
+ <key data>
+ ------END PUBLIC KEY-------
+ private_key: |
+ ------BEGIN PRIVATE KEY------
+ <key data>
+ ------END PRIVATE KEY-------
+collect_scripts:
+ minion: |
+ #!/bin/bash
+ cat /etc/salt/minion
+ minion_id: |
+ #!/bin/bash
+ cat /etc/salt/minion_id
+ minion.pem: |
+ #!/bin/bash
+ cat /etc/salt/pki/minion/minion.pem
+ minion.pub: |
+ #!/bin/bash
+ cat /etc/salt/pki/minion/minion.pub
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/seed_random_command.yaml b/tests/cloud_tests/configs/modules/seed_random_command.yaml
new file mode 100644
index 00000000..6a9157eb
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/seed_random_command.yaml
@@ -0,0 +1,18 @@
+#
+# Use uuid to create a random string
+#
+# 2016-11-15 Disabled as this is not working currently
+#
+enabled: False
+cloud_config: |
+ #cloud-config
+ random_seed:
+ command: ["cat", "/proc/sys/kernel/random/uuid"]
+ command_required: true
+ file: /root/seed
+collect_scripts:
+ seed_data: |
+ #!/bin/bash
+ cat /root/seed
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/seed_random_data.yaml b/tests/cloud_tests/configs/modules/seed_random_data.yaml
new file mode 100644
index 00000000..a9b2c885
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/seed_random_data.yaml
@@ -0,0 +1,15 @@
+#
+# Push in random raw string to set as seed
+#
+cloud_config: |
+ #cloud-config
+ random_seed:
+ data: 'MYUb34023nD:LFDK10913jk;dfnk:Df'
+ encoding: raw
+ file: /root/seed
+collect_scripts:
+ seed_data: |
+ #!/bin/bash
+ cat /root/seed
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/set_hostname.yaml b/tests/cloud_tests/configs/modules/set_hostname.yaml
new file mode 100644
index 00000000..5aae1506
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/set_hostname.yaml
@@ -0,0 +1,18 @@
+#
+# Set the hostname and update /etc/hosts
+#
+cloud_config: |
+ #cloud-config
+ hostname: myhostname
+collect_scripts:
+ hosts: |
+ #!/bin/bash
+ grep ^127 /etc/hosts
+ hostname: |
+ #!/bin/bash
+ hostname
+ fqdn: |
+ #!/bin/bash
+ hostname --fqdn
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/set_hostname_fqdn.yaml b/tests/cloud_tests/configs/modules/set_hostname_fqdn.yaml
new file mode 100644
index 00000000..0014c197
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/set_hostname_fqdn.yaml
@@ -0,0 +1,20 @@
+#
+# Set the hostname and update /etc/hosts
+#
+cloud_config: |
+ #cloud-config
+ manage_etc_hosts: true
+ hostname: myhostname
+ fqdn: host.myorg.com
+collect_scripts:
+ hosts: |
+ #!/bin/bash
+ grep ^127 /etc/hosts
+ hostname: |
+ #!/bin/bash
+ hostname
+ fqdn: |
+ #!/bin/bash
+ hostname --fqdn
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/set_password.yaml b/tests/cloud_tests/configs/modules/set_password.yaml
new file mode 100644
index 00000000..8fa46d9f
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/set_password.yaml
@@ -0,0 +1,17 @@
+#
+# Set password of default user
+#
+cloud_config: |
+ #cloud-config
+ password: password
+ chpasswd: { expire: False }
+ ssh_pwauth: True
+collect_scripts:
+ shadow: |
+ #!/bin/bash
+ cat /etc/shadow
+ sshd_config: |
+ #!/bin/bash
+ grep '^PasswordAuth' /etc/ssh/sshd_config
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/set_password_expire.yaml b/tests/cloud_tests/configs/modules/set_password_expire.yaml
new file mode 100644
index 00000000..926731f0
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/set_password_expire.yaml
@@ -0,0 +1,28 @@
+#
+# Expire password for all users
+#
+cloud_config: |
+ #cloud-config
+ chpasswd: { expire: True }
+ users:
+ - name: tom
+ password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ lock_passwd: false
+ - name: dick
+ password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ lock_passwd: false
+ - name: harry
+ password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ lock_passwd: false
+ - name: jane
+ password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ lock_passwd: false
+collect_scripts:
+ shadow: |
+ #!/bin/bash
+ cat /etc/shadow
+ sshd_config: |
+ #!/bin/bash
+ grep '^PasswordAuth' /etc/ssh/sshd_config
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/set_password_list.yaml b/tests/cloud_tests/configs/modules/set_password_list.yaml
new file mode 100644
index 00000000..36129047
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/set_password_list.yaml
@@ -0,0 +1,33 @@
+#
+# Set password of list of users
+#
+cloud_config: |
+ #cloud-config
+ ssh_pwauth: yes
+ users:
+ - name: tom
+ password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ lock_passwd: false
+ - name: dick
+ password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ lock_passwd: false
+ - name: harry
+ password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ lock_passwd: false
+ - name: jane
+ password: $1$xyz$sPMsLNmf66Ohl.ol6JvzE.
+ lock_passwd: false
+ chpasswd:
+ list: |
+ tom:mypassword123!
+ dick:R
+ harry:Random
+collect_scripts:
+ shadow: |
+ #!/bin/bash
+ cat /etc/shadow
+ sshd_config: |
+ #!/bin/bash
+ grep '^PasswordAuth' /etc/ssh/sshd_config
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/snappy.yaml b/tests/cloud_tests/configs/modules/snappy.yaml
new file mode 100644
index 00000000..923bfe12
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/snappy.yaml
@@ -0,0 +1,13 @@
+#
+# Install snappy
+#
+cloud_config: |
+ #cloud-config
+ snappy:
+ system_snappy: auto
+collect_scripts:
+ snap_version: |
+ #!/bin/bash
+ snap --version
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_disable.yaml b/tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_disable.yaml
new file mode 100644
index 00000000..33943bdd
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_disable.yaml
@@ -0,0 +1,13 @@
+#
+# Disable fingerprint printing
+#
+cloud_config: |
+ #cloud-config
+ ssh_genkeytypes: []
+ no_ssh_fingerprints: true
+collect_scripts:
+ syslog: |
+ #!/bin/bash
+ cat /var/log/syslog
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_enable.yaml b/tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_enable.yaml
new file mode 100644
index 00000000..4c970778
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_enable.yaml
@@ -0,0 +1,16 @@
+#
+# Print auth keys with different hash than md5
+#
+cloud_config: |
+ #cloud-config
+ ssh_genkeytypes:
+ - ecdsa
+ - ed25519
+ ssh_authorized_keys:
+ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXW9Gg5H7ehjdSc6qDzwNtgCy94XYHhEYlXZMO2+FJrH3wfHGiMfCwOHxcOMt2QiXItULthdeQWS9QjBSSjVRXf6731igFrqPFyS9qBlOQ5D29C4HBXFnQggGVpBNJ82IRJv7szbbe/vpgLBP4kttUza9Dr4e1YM1ln4PRnjfXea6T0m+m1ixNb5432pTXlqYOnNOxSIm1gHgMLxPuDrJvQERDKrSiKSjIdyC9Jd8t2e1tkNLY0stmckVRbhShmcJvlyofHWbc2Ca1mmtP7MlS1VQnfLkvU1IrFwkmaQmaggX6WR6coRJ6XFXdWcq/AI2K6GjSnl1dnnCxE8VCEXBlXgFzad+PMSG4yiL5j8Oo1ZVpkTdgBnw4okGqTYCXyZg6X00As9IBNQfZMFlQXlIo4FiWgj3CO5QHQOyOX6FuEumaU13GnERrSSdp9tCs1Qm3/DG2RSCQBWTfcgMcStIvKqvJ3IjFn0vGLvI3Ampnq9q1SHwmmzAPSdzcMA76HyMUA5VWaBvWHlUxzIM6unxZASnwvuCzpywSEB5J2OF+p6H+cStJwQ32XwmOG8pLp1srlVWpqZI58Du/lzrkPqONphoZx0LDV86w7RUz1ksDzAdcm0tvmNRFMN1a0frDs506oA3aWK0oDk4Nmvk8sXGTYYw3iQSkOvDUUlIsqdaO+w==
+collect_scripts:
+ syslog: |
+ #!/bin/bash
+ cat /var/log/syslog
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ssh_import_id.yaml b/tests/cloud_tests/configs/modules/ssh_import_id.yaml
new file mode 100644
index 00000000..6e5a1635
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ssh_import_id.yaml
@@ -0,0 +1,14 @@
+#
+# Import a user's ssh key via gh or lp
+#
+cloud_config: |
+ #cloud-config
+ ssh_import_id:
+ - gh:powersj
+ - lp:smoser
+collect_scripts:
+ auth_keys_ubuntu: |
+ #!/bin/bash
+ cat /home/ubuntu/.ssh/authorized_keys
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ssh_keys_generate.yaml b/tests/cloud_tests/configs/modules/ssh_keys_generate.yaml
new file mode 100644
index 00000000..637d7835
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ssh_keys_generate.yaml
@@ -0,0 +1,42 @@
+#
+# SSH keys generated using cloud-init
+#
+cloud_config: |
+ #cloud-config
+ ssh_genkeytypes:
+ - ecdsa
+ - ed25519
+ authkey_hash: sha512
+collect_scripts:
+ auth_keys_root: |
+ #!/bin/bash
+ cat /root/.ssh/authorized_keys
+ auth_keys_ubuntu: |
+ #!/bin/bash
+ cat /home/ubuntu/ssh/authorized_keys
+ dsa_public: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_dsa_key.pub
+ dsa_private: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_dsa_key
+ rsa_public: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_rsa_key.pub
+ rsa_private: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_rsa_key
+ ecdsa_public: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_ecdsa_key.pub
+ ecdsa_private: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_ecdsa_key
+ ed25519_public: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_ed25519_key.pub
+ ed25519_private: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_ed25519_key
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/ssh_keys_provided.yaml b/tests/cloud_tests/configs/modules/ssh_keys_provided.yaml
new file mode 100644
index 00000000..25df6452
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/ssh_keys_provided.yaml
@@ -0,0 +1,102 @@
+#
+# SSH keys provided via cloud config
+#
+enabled: False
+cloud_config: |
+ #cloud-config
+ disable_root: false
+ ssh_authorized_keys:
+ - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXW9Gg5H7ehjdSc6qDzwNtgCy94XYHhEYlXZMO2+FJrH3wfHGiMfCwOHxcOMt2QiXItULthdeQWS9QjBSSjVRXf6731igFrqPFyS9qBlOQ5D29C4HBXFnQggGVpBNJ82IRJv7szbbe/vpgLBP4kttUza9Dr4e1YM1ln4PR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Lm0l4iLIVl03otGOqvSzs+
+ A3tFPEOxauXpzCt8f8eXsz0WQXAgIKW2h8zu5QHjomioU3i27mtE
+ -----END RSA PRIVATE KEY-----
+ rsa_public: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0/Ho+o3eJISydO2JvIgTLnZOtrxPl+fSvJfKDjoOLY0HB2eOjy2s2/2N6d9X9SGZ4+XnyVeNPjfBXw4IyXoqxhfIF16Azfk022iejgjiYssoUxH31M60OfqJhxo16dWEXdkKP1nac06VOt1zS5yEeooyvEuMJEJSsv3VR/7GKhMX3TVhEz5moLmVP3bIAvvoXio8X4urVC1R819QjDC86nlxwNks/GKPRi/IHO5tjJ72Eke7KNsm/vxHgkdX4vZaHNKhfdb/pavFXN5eoUaofz3hxw5oL/u2epI/pXyUhDp8Tb5wO6slykzcIlGCSd0YeO1TnljvViRx0uSxIy97N root@xenial-lxd
+ dsa_private: |
+ -----BEGIN DSA PRIVATE KEY-----
+ MIIBuwIBAAKBgQD5Fstc23IVSDe6k4DNP8smPKuEWUvHDTOGaXrhOVAfzZ6+jklP
+ 55mzvC7jO53PWWC31hq10xBoWdev0WtcNF9Tv+4bAa1263y51Rqo4GI7xx+xic1d
+ mLqqfYijBT9k48J/1tV0cs1Wjs6FP/IJTD/kYVC930JjYQMi722lBnUxsQIVAL7i
+ z3fTGKTvSzvW0wQlwnYpS2QFAoGANp+KdyS9V93HgxGQEN1rlj/TSv/a3EVdCKtE
+ nQf55aPHxDAVDVw5JtRh4pZbbRV4oGRPc9KOdjo5BU28vSM3Lmhkb+UaaDXwHkgI
+ nK193o74DKjADWZxuLyyiKHiMOhxozoxDfjWxs8nz6uqvSW0pr521EwIY6RajbED
+ nZ2a3GkCgYEAyoUomNRB6bmpsIfzt8zdtqLP5umIj2uhr9MVPL8/QdbxmJ72Z7pf
+ Q2z1B7QAdIBGOlqJXtlau7ABhWK29Efe+99ObyTSSdDc6RCDeAwUmBAiPRQhDH2E
+ wExw3doDSCUb28L1B50wBz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3RAeGVuaWFsLWx4ZAECAwQFBg==
+ -----END OPENSSH PRIVATE KEY-----
+ ed25519_public: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINudAZSu4vjZpVWzId5pXmZg1M6G15dqjQ2XkNVOEnb5 root@xenial-lxd
+ ecdsa_private: |
+ -----BEGIN EC PRIVATE KEY-----
+ MHcCAQEEIDuK+QFc1wmyJY8uDqQVa1qHte30Rk/fdLxGIBkwJAyOoAoGCCqGSM49
+ AwEHoUQDQgAEWxLlO+TL8gL91eET9p/HFQbqR1A691AkJgZk3jY5mpZqxgX4vcgb
+ 7f/CtXuM6s2svcDJqAeXr6Wk8OJJcMxylA==
+ -----END EC PRIVATE KEY-----
+ ecdsa_public: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFsS5Tvky/IC/dXhE/afxxUG6kdQOvdQJCYGZN42OZqWasYF+L3IG+3/wrV7jOrNrL3AyagHl6+lpPDiSXDMcpQ= root@xenial-lxd
+collect_scripts:
+ auth_keys_root: |
+ #!/bin/bash
+ cat /root/.ssh/authorized_keys
+ auth_keys_ubuntu: |
+ #!/bin/bash
+ cat /home/ubuntu/ssh/authorized_keys
+ dsa_public: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_dsa_key.pub
+ dsa_private: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_dsa_key
+ rsa_public: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_rsa_key.pub
+ rsa_private: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_rsa_key
+ ecdsa_public: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_ecdsa_key.pub
+ ecdsa_private: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_ecdsa_key
+ ed25519_public: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_ed25519_key.pub
+ ed25519_private: |
+ #!/bin/bash
+ cat /etc/ssh/ssh_host_ed25519_key
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/timezone.yaml b/tests/cloud_tests/configs/modules/timezone.yaml
new file mode 100644
index 00000000..6a05aba1
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/timezone.yaml
@@ -0,0 +1,12 @@
+#
+# Set system timezone
+#
+cloud_config: |
+ #cloud-config
+ timezone: US/Aleutian
+collect_scripts:
+ timezone: |
+ #!/bin/bash
+ date +%Z
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/user_groups.yaml b/tests/cloud_tests/configs/modules/user_groups.yaml
new file mode 100644
index 00000000..92655958
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/user_groups.yaml
@@ -0,0 +1,50 @@
+#
+# Create groups and users with various options
+#
+cloud_config: |
+ #cloud-config
+ # Add groups to the system
+ groups:
+ - secret: [foobar,barfoo]
+ - cloud-users
+
+ # Add users to the system. Users are added after groups are added.
+ users:
+ - default
+ - name: foobar
+ gecos: Foo B. Bar
+ primary-group: foobar
+ groups: users
+ expiredate: 2038-01-19
+ lock_passwd: false
+ passwd: $6$j212wezy$7H/1LT4f9/N3wpgNunhsIqtMj62OKiS3nyNwuizouQc3u7MbYCarYeAHWYPYb2FT.lbioDm2RrkJPb9BZMN1O/
+ - name: barfoo
+ gecos: Bar B. Foo
+ sudo: ALL=(ALL) NOPASSWD:ALL
+ groups: cloud-users
+ lock_passwd: true
+ - name: cloudy
+ gecos: Magic Cloud App Daemon User
+ inactive: true
+ system: true
+collect_scripts:
+ group_ubuntu: |
+ #!/bin/bash
+ getent group ubuntu
+ group_cloud_users: |
+ #!/bin/bash
+ getent group cloud-users
+ user_ubuntu: |
+ #!/bin/bash
+ getent passwd ubuntu
+ user_foobar: |
+ #!/bin/bash
+ getent passwd foobar
+ user_barfoo: |
+ #!/bin/bash
+ getent passwd barfoo
+ user_cloudy: |
+ #!/bin/bash
+ getent passwd cloudy
+
+# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/configs/modules/write_files.yaml b/tests/cloud_tests/configs/modules/write_files.yaml
new file mode 100644
index 00000000..4bb2991a
--- /dev/null
+++ b/tests/cloud_tests/configs/modules/write_files.yaml
@@ -0,0 +1,42 @@
+#
+# Write various file types
+#
+cloud_config: |
+ #cloud-config
+ write_files:
+ - encoding: b64
+ content: CiMgVGhpcyBmaWxlIGNvbnRyb2xzIHRoZSBzdGF0ZSBvZiBTRUxpbnV4
+ owner: root:root
+ path: /root/file_b64
+ permissions: '0644'
+ - content: |
+ # My new /root/file_text
+
+ SMBDOPTIONS="-D"
+ path: /root/file_text
+ - content: !!binary |
+ f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAwARAAAAAAABAAAAAAAAAAJAVAAAAAAAAAAAAAEAAOAAI
+ AEAAHgAdAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgA
+ AAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAA
+ path: /root/file_binary
+ permissions: '0555'
+ - encoding: gzip
+ content: !!binary |
+ H4sIAIDb/U8C/1NW1E/KzNMvzuBKTc7IV8hIzcnJVyjPL8pJ4QIA6N+MVxsAAAA=
+ path: /root/file_gzip
+ permissions: '0755'
+collect_scripts:
+ file_b64: |
+ #!/bin/bash
+ file /root/file_b64
+ file_text: |
+ #!/bin/bash
+ file /root/file_text
+ file_binary: |
+ #!/bin/bash
+ file /root/file_binary
+ file_gzip: |
+ #!/bin/bash
+ file /root/file_gzip
+
+# vi: ts=4 expandtab