diff options
Diffstat (limited to 'tests/cloud_tests/testcases/examples')
14 files changed, 489 insertions, 0 deletions
diff --git a/tests/cloud_tests/testcases/examples/README.md b/tests/cloud_tests/testcases/examples/README.md new file mode 100644 index 00000000..110a223b --- /dev/null +++ b/tests/cloud_tests/testcases/examples/README.md @@ -0,0 +1,12 @@ +# Example Test Configs + +## Purpose +This folder contains example cloud configs found on +[cloudinit.readthedocs.io](https://cloudinit.readthedocs.io/en/latest/topics/examples.html). +Examples covered by other tests, like modules, are excluded from tests here +to prevent duplication and reduce test time. + +## Structure +One test per example test config on cloudinit.readthedocs.io + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/TODO.md b/tests/cloud_tests/testcases/examples/TODO.md new file mode 100644 index 00000000..8db0e98e --- /dev/null +++ b/tests/cloud_tests/testcases/examples/TODO.md @@ -0,0 +1,15 @@ +# Missing Examples + +Below lists each of the issing examples and why it is not currently added. + + - Chef (takes > 60 seconds to run) + - Puppet (takes > 60 seconds to run) + - Manage resolve.conf (lxd backend overrides changes) + - Adding a yum repository (need centos system) + - Register RedHat Subscription (need centos system + subscription) + - Adjust mount points mounted (need multiple disks) + - Call a url when finished (need end point) + - Reboot/poweroff when finished (how to test) + - Disk setup (need multiple disks) + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/add_apt_repositories.yaml b/tests/cloud_tests/testcases/examples/add_apt_repositories.yaml new file mode 100644 index 00000000..4b8575f7 --- /dev/null +++ b/tests/cloud_tests/testcases/examples/add_apt_repositories.yaml @@ -0,0 +1,23 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +required_features: + - apt +cloud_config: | + #cloud-config + apt: + primary: + - arches: [default] + uri: "http://www.gtlib.gatech.edu/pub/ubuntu-releases/" +collect_scripts: + ubuntu.sources.list: | + #!/bin/bash + cat /etc/apt/sources.list | grep -v '^#' | sed '/^\s*$/d' | grep archive.ubuntu.com | wc -l + gatech.sources.list: | + #!/bin/bash + cat /etc/apt/sources.list | grep -v '^#' | sed '/^\s*$/d' | grep gtlib.gatech.edu | wc -l + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/alter_completion_message.yaml b/tests/cloud_tests/testcases/examples/alter_completion_message.yaml new file mode 100644 index 00000000..9e154f80 --- /dev/null +++ b/tests/cloud_tests/testcases/examples/alter_completion_message.yaml @@ -0,0 +1,16 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +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/testcases/examples/configure_instance_trusted_ca_certificates.yaml b/tests/cloud_tests/testcases/examples/configure_instance_trusted_ca_certificates.yaml new file mode 100644 index 00000000..ad32b088 --- /dev/null +++ b/tests/cloud_tests/testcases/examples/configure_instance_trusted_ca_certificates.yaml @@ -0,0 +1,41 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +cloud_config: | + #cloud-config + ca-certs: + # If present and set to True, the 'remove-defaults' parameter will remove + # all the default trusted CA certificates that are normally shipped with + # Ubuntu. + # This is mainly for paranoid admins - most users will not need this + # functionality. + remove-defaults: true + + # If present, the 'trusted' parameter should contain a certificate (or list + # of certificates) to add to the system as trusted CA certificates. + # Pay close attention to the YAML multiline list syntax. The example shown + # here is for a list of multiline certificates. + trusted: + - | + -----BEGIN CERTIFICATE----- + YOUR-ORGS-TRUSTED-CA-CERT-HERE + -----END CERTIFICATE----- + - | + -----BEGIN CERTIFICATE----- + YOUR-ORGS-TRUSTED-CA-CERT-HERE + -----END CERTIFICATE----- +collect_scripts: + cloudinit_certs: | + #!/bin/bash + cat /etc/ssl/certs/cloud-init-ca-certs.pem + cert_count_ca: | + #!/bin/bash + wc -l /etc/ssl/certs/ca-certificates.crt + cert_count_cloudinit: | + #!/bin/bash + wc -l /etc/ssl/certs/cloud-init-ca-certs.pem + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/configure_instances_ssh_keys.yaml b/tests/cloud_tests/testcases/examples/configure_instances_ssh_keys.yaml new file mode 100644 index 00000000..f3eaf3ce --- /dev/null +++ b/tests/cloud_tests/testcases/examples/configure_instances_ssh_keys.yaml @@ -0,0 +1,63 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +cloud_config: | + #cloud-config + ssh_authorized_keys: + - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEA3FSyQwBI6Z+nCSjUUk8EEAnnkhXlukKoUPND/RRClWz2s5TCzIkd3Ou5+Cyz71X0XmazM3l5WgeErvtIwQMyT1KjNoMhoJMrJnWqQPOt5Q8zWd9qG7PBl9+eiH5qV7NZ mykey@host + - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies + + # Send pre-generated ssh private keys to the server + # If these are present, they will be written to /etc/ssh and + # new random keys will not be generated + # in addition to 'rsa' and 'dsa' as shown below, 'ecdsa' is also supported + ssh_keys: + rsa_private: | + -----BEGIN RSA PRIVATE KEY----- + MIIBxwIBAAJhAKD0YSHy73nUgysO13XsJmd4fHiFyQ+00R7VVu2iV9Qcon2LZS/x + 1cydPZ4pQpfjEha6WxZ6o8ci/Ea/w0n+0HGPwaxlEG2Z9inNtj3pgFrYcRztfECb + 1j6HCibZbAzYtwIBIwJgO8h72WjcmvcpZ8OvHSvTwAguO2TkR6mPgHsgSaKy6GJo + PUJnaZRWuba/HX0KGyhz19nPzLpzG5f0fYahlMJAyc13FV7K6kMBPXTRR6FxgHEg + L0MPC7cdqAwOVNcPY6A7AjEA1bNaIjOzFN2sfZX0j7OMhQuc4zP7r80zaGc5oy6W + p58hRAncFKEvnEq2CeL3vtuZAjEAwNBHpbNsBYTRPCHM7rZuG/iBtwp8Rxhc9I5w + ixvzMgi+HpGLWzUIBS+P/XhekIjPAjA285rVmEP+DR255Ls65QbgYhJmTzIXQ2T9 + luLvcmFBC6l35Uc4gTgg4ALsmXLn71MCMGMpSWspEvuGInayTCL+vEjmNBT+FAdO + W7D4zCpI43jRS9U06JVOeSc9CDk2lwiA3wIwCTB/6uc8Cq85D9YqpM10FuHjKpnP + REPPOyrAspdeOAV+6VKRavstea7+2DZmSUgE + -----END RSA PRIVATE KEY----- + + rsa_public: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEAoPRhIfLvedSDKw7XdewmZ3h8eIXJD7TRHtVW7aJX1ByifYtlL/HVzJ09nilCl+MSFrpbFnqjxyL8Rr/DSf7QcY/BrGUQbZn2Kc22PemAWthxHO18QJvWPocKJtlsDNi3 smoser@localhost + + dsa_private: | + -----BEGIN DSA PRIVATE KEY----- + MIIBuwIBAAKBgQDP2HLu7pTExL89USyM0264RCyWX/CMLmukxX0Jdbm29ax8FBJT + pLrO8TIXVY5rPAJm1dTHnpuyJhOvU9G7M8tPUABtzSJh4GVSHlwaCfycwcpLv9TX + DgWIpSj+6EiHCyaRlB1/CBp9RiaB+10QcFbm+lapuET+/Au6vSDp9IRtlQIVAIMR + 8KucvUYbOEI+yv+5LW9u3z/BAoGBAI0q6JP+JvJmwZFaeCMMVxXUbqiSko/P1lsa + LNNBHZ5/8MOUIm8rB2FC6ziidfueJpqTMqeQmSAlEBCwnwreUnGfRrKoJpyPNENY + d15MG6N5J+z81sEcHFeprryZ+D3Ge9VjPq3Tf3NhKKwCDQ0240aPezbnjPeFm4mH + bYxxcZ9GAoGAXmLIFSQgiAPu459rCKxT46tHJtM0QfnNiEnQLbFluefZ/yiI4DI3 + 8UzTCOXLhUA7ybmZha+D/csj15Y9/BNFuO7unzVhikCQV9DTeXX46pG4s1o23JKC + /QaYWNMZ7kTRv+wWow9MhGiVdML4ZN4XnifuO5krqAybngIy66PMEoQCFEIsKKWv + 99iziAH0KBMVbxy03Trz + -----END DSA PRIVATE KEY----- + + dsa_public: ssh-dsa AAAAB3NzaC1kc3MAAACBAM/Ycu7ulMTEvz1RLIzTbrhELJZf8Iwua6TFfQl1ubb1rHwUElOkus7xMhdVjms8AmbV1Meem7ImE69T0bszy09QAG3NImHgZVIeXBoJ/JzByku/1NcOBYilKP7oSIcLJpGUHX8IGn1GJoH7XRBwVub6Vqm4RP78C7q9IOn0hG2VAAAAFQCDEfCrnL1GGzhCPsr/uS1vbt8/wQAAAIEAjSrok/4m8mbBkVp4IwxXFdRuqJKSj8/WWxos00Ednn/ww5QibysHYULrOKJ1+54mmpMyp5CZICUQELCfCt5ScZ9GsqgmnI80Q1h3Xkwbo3kn7PzWwRwcV6muvJn4PcZ71WM+rdN/c2EorAINDTbjRo97NueM94WbiYdtjHFxn0YAAACAXmLIFSQgiAPu459rCKxT46tHJtM0QfnNiEnQLbFluefZ/yiI4DI38UzTCOXLhUA7ybmZha+D/csj15Y9/BNFuO7unzVhikCQV9DTeXX46pG4s1o23JKC/QaYWNMZ7kTRv+wWow9MhGiVdML4ZN4XnifuO5krqAybngIy66PMEoQ= smoser@localhost +collect_scripts: + cert_count: | + #!/bin/bash + ls | wc -l + dsa_public: | + #!/bin/bash + cat /etc/ssh/ssh_host_dsa_key.pub + rsa_public: | + #!/bin/bash + cat /etc/ssh/ssh_host_rsa_key.pub + auth_keys: | + #!/bin/bash + cat /home/ubuntu/.ssh/authorized_keys + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/including_user_groups.yaml b/tests/cloud_tests/testcases/examples/including_user_groups.yaml new file mode 100644 index 00000000..0aa7ad21 --- /dev/null +++ b/tests/cloud_tests/testcases/examples/including_user_groups.yaml @@ -0,0 +1,53 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +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/testcases/examples/install_arbitrary_packages.yaml b/tests/cloud_tests/testcases/examples/install_arbitrary_packages.yaml new file mode 100644 index 00000000..d3980228 --- /dev/null +++ b/tests/cloud_tests/testcases/examples/install_arbitrary_packages.yaml @@ -0,0 +1,20 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +cloud_config: | + #cloud-config + packages: + - htop + - tree +collect_scripts: + htop: | + #!/bin/bash + dpkg -l | grep htop | wc -l + tree: | + #!/bin/bash + dpkg -l | grep tree | wc -l + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/install_run_chef_recipes.yaml b/tests/cloud_tests/testcases/examples/install_run_chef_recipes.yaml new file mode 100644 index 00000000..0bec305e --- /dev/null +++ b/tests/cloud_tests/testcases/examples/install_run_chef_recipes.yaml @@ -0,0 +1,103 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2017-03-31: Disabled as depends on third party apt repository +# +enabled: False +cloud_config: | + #cloud-config + # Key from https://packages.chef.io/chef.asc + apt: + source1: + source: "deb http://packages.chef.io/repos/apt/stable $RELEASE main" + key: | + -----BEGIN PGP PUBLIC KEY BLOCK----- + Version: GnuPG v1.4.12 (Darwin) + Comment: GPGTools - http://gpgtools.org + + mQGiBEppC7QRBADfsOkZU6KZK+YmKw4wev5mjKJEkVGlus+NxW8wItX5sGa6kdUu + twAyj7Yr92rF+ICFEP3gGU6+lGo0Nve7KxkN/1W7/m3G4zuk+ccIKmjp8KS3qn99 + dxy64vcji9jIllVa+XXOGIp0G8GEaj7mbkixL/bMeGfdMlv8Gf2XPpp9vwCgn/GC + JKacfnw7MpLKUHOYSlb//JsEAJqao3ViNfav83jJKEkD8cf59Y8xKia5OpZqTK5W + ShVnNWS3U5IVQk10ZDH97Qn/YrK387H4CyhLE9mxPXs/ul18ioiaars/q2MEKU2I + XKfV21eMLO9LYd6Ny/Kqj8o5WQK2J6+NAhSwvthZcIEphcFignIuobP+B5wNFQpe + DbKfA/0WvN2OwFeWRcmmd3Hz7nHTpcnSF+4QX6yHRF/5BgxkG6IqBIACQbzPn6Hm + sMtm/SVf11izmDqSsQptCrOZILfLX/mE+YOl+CwWSHhl+YsFts1WOuh1EhQD26aO + Z84HuHV5HFRWjDLw9LriltBVQcXbpfSrRP5bdr7Wh8vhqJTPjrQnT3BzY29kZSBQ + YWNrYWdlcyA8cGFja2FnZXNAb3BzY29kZS5jb20+iGAEExECACAFAkppC7QCGwMG + CwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRApQKupg++Caj8sAKCOXmdG36gWji/K + +o+XtBfvdMnFYQCfTCEWxRy2BnzLoBBFCjDSK6sJqCu0IENIRUYgUGFja2FnZXMg + PHBhY2thZ2VzQGNoZWYuaW8+iGIEExECACIFAlQwYFECGwMGCwkIBwMCBhUIAgkK + CwQWAgMBAh4BAheAAAoJEClAq6mD74JqX94An26z99XOHWpLN8ahzm7cp13t4Xid + AJ9wVcgoUBzvgg91lKfv/34cmemZn7kCDQRKaQu0EAgAg7ZLCVGVTmLqBM6njZEd + Zbv+mZbvwLBSomdiqddE6u3eH0X3GuwaQfQWHUVG2yedyDMiG+EMtCdEeeRebTCz + SNXQ8Xvi22hRPoEsBSwWLZI8/XNg0n0f1+GEr+mOKO0BxDB2DG7DA0nnEISxwFkK + OFJFebR3fRsrWjj0KjDxkhse2ddU/jVz1BY7Nf8toZmwpBmdozETMOTx3LJy1HZ/ + Te9FJXJMUaB2lRyluv15MVWCKQJro4MQG/7QGcIfrIZNfAGJ32DDSjV7/YO+IpRY + IL4CUBQ65suY4gYUG4jhRH6u7H1p99sdwsg5OIpBe/v2Vbc/tbwAB+eJJAp89Zeu + twADBQf/ZcGoPhTGFuzbkcNRSIz+boaeWPoSxK2DyfScyCAuG41CY9+g0HIw9Sq8 + DuxQvJ+vrEJjNvNE3EAEdKl/zkXMZDb1EXjGwDi845TxEMhhD1dDw2qpHqnJ2mtE + WpZ7juGwA3sGhi6FapO04tIGacCfNNHmlRGipyq5ZiKIRq9mLEndlECr8cwaKgkS + 0wWu+xmMZe7N5/t/TK19HXNh4tVacv0F3fYK54GUjt2FjCQV75USnmNY4KPTYLXA + dzC364hEMlXpN21siIFgB04w+TXn5UF3B4FfAy5hevvr4DtV4MvMiGLu0oWjpaLC + MpmrR3Ny2wkmO0h+vgri9uIP06ODWIhJBBgRAgAJBQJKaQu0AhsMAAoJEClAq6mD + 74Jq4hIAoJ5KrYS8kCwj26SAGzglwggpvt3CAJ0bekyky56vNqoegB+y4PQVDv4K + zA== + =IxPr + -----END PGP PUBLIC KEY BLOCK----- + + chef: + + # Valid values are 'gems' and 'packages' and 'omnibus' + install_type: "packages" + + # Boolean: run 'install_type' code even if chef-client + # appears already installed. + force_install: false + + # Chef settings + server_url: "https://chef.yourorg.com:4000" + + # Node Name + # Defaults to the instance-id if not present + node_name: "your-node-name" + + # Environment + # Defaults to '_default' if not present + environment: "production" + + # Default validation name is chef-validator + validation_name: "yourorg-validator" + # if validation_cert's value is "system" then it is expected + # that the file already exists on the system. + validation_cert: | + -----BEGIN RSA PRIVATE KEY----- + YOUR-ORGS-VALIDATION-KEY-HERE + -----END RSA PRIVATE KEY----- + + # A run list for a first boot json + run_list: + - "recipe[apache2]" + - "role[db]" + + # Specify a list of initial attributes used by the cookbooks + initial_attributes: + apache: + prefork: + maxclients: 100 + keepalive: "off" + + # if install_type is 'omnibus', change the url to download + omnibus_url: "https://www.opscode.com/chef/install.sh" + + + # Capture all subprocess output into a logfile + # Useful for troubleshooting cloud-init issues + output: {all: '| tee -a /var/log/cloud-init-output.log'} + +collect_scripts: + chef_installed: | + #!/bin/sh + dpkg-query -W -f '${Status}\n' chef + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/run_apt_upgrade.yaml b/tests/cloud_tests/testcases/examples/run_apt_upgrade.yaml new file mode 100644 index 00000000..2b7eae4c --- /dev/null +++ b/tests/cloud_tests/testcases/examples/run_apt_upgrade.yaml @@ -0,0 +1,11 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +cloud_config: | + #cloud-config + package_upgrade: true + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/run_commands.yaml b/tests/cloud_tests/testcases/examples/run_commands.yaml new file mode 100644 index 00000000..b0e311ba --- /dev/null +++ b/tests/cloud_tests/testcases/examples/run_commands.yaml @@ -0,0 +1,16 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +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/testcases/examples/run_commands_first_boot.yaml b/tests/cloud_tests/testcases/examples/run_commands_first_boot.yaml new file mode 100644 index 00000000..7bd803db --- /dev/null +++ b/tests/cloud_tests/testcases/examples/run_commands_first_boot.yaml @@ -0,0 +1,16 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +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/testcases/examples/setup_run_puppet.yaml b/tests/cloud_tests/testcases/examples/setup_run_puppet.yaml new file mode 100644 index 00000000..e366c042 --- /dev/null +++ b/tests/cloud_tests/testcases/examples/setup_run_puppet.yaml @@ -0,0 +1,55 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as test suite fails this long running test currently +# +enabled: False +cloud_config: | + #cloud-config + puppet: + # Every key present in the conf object will be added to puppet.conf: + # [name] + # subkey=value + # + # For example the configuration below will have the following section + # added to puppet.conf: + # [puppetd] + # server=puppetmaster.example.org + # certname=i-0123456.ip-X-Y-Z.cloud.internal + # + # The puppmaster ca certificate will be available in + # /var/lib/puppet/ssl/certs/ca.pem + conf: + agent: + server: "puppetmaster.example.org" + # certname supports substitutions at runtime: + # %i: instanceid + # Example: i-0123456 + # %f: fqdn of the machine + # Example: ip-X-Y-Z.cloud.internal + # + # NB: the certname will automatically be lowercased as required by puppet + certname: "%i.%f" + # ca_cert is a special case. It won't be added to puppet.conf. + # It holds the puppetmaster certificate in pem format. + # It should be a multi-line string (using the | yaml notation for + # multi-line strings). + # The puppetmaster certificate is located in + # /var/lib/puppet/ssl/ca/ca_crt.pem on the puppetmaster host. + # + ca_cert: | + -----BEGIN CERTIFICATE----- + MIICCTCCAXKgAwIBAgIBATANBgkqhkiG9w0BAQUFADANMQswCQYDVQQDDAJjYTAe + Fw0xMDAyMTUxNzI5MjFaFw0xNTAyMTQxNzI5MjFaMA0xCzAJBgNVBAMMAmNhMIGf + MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCu7Q40sm47/E1Pf+r8AYb/V/FWGPgc + b014OmNoX7dgCxTDvps/h8Vw555PdAFsW5+QhsGr31IJNI3kSYprFQcYf7A8tNWu + 1MASW2CfaEiOEi9F1R3R4Qlz4ix+iNoHiUDTjazw/tZwEdxaQXQVLwgTGRwVa+aA + qbutJKi93MILLwIDAQABo3kwdzA4BglghkgBhvhCAQ0EKxYpUHVwcGV0IFJ1Ynkv + T3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwDwYDVR0TAQH/BAUwAwEB/zAd + BgNVHQ4EFgQUu4+jHB+GYE5Vxo+ol1OAhevspjAwCwYDVR0PBAQDAgEGMA0GCSqG + SIb3DQEBBQUAA4GBAH/rxlUIjwNb3n7TXJcDJ6MMHUlwjr03BDJXKb34Ulndkpaf + +GAlzPXWa7bO908M9I8RnPfvtKnteLbvgTK+h+zX1XCty+S2EQWk29i2AdoqOTxb + hppiGMp0tT5Havu4aceCXiy2crVcudj3NFciy8X66SoECemW9UYDCb9T5D0d + -----END CERTIFICATE----- + +# vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/examples/writing_out_arbitrary_files.yaml b/tests/cloud_tests/testcases/examples/writing_out_arbitrary_files.yaml new file mode 100644 index 00000000..6f78f994 --- /dev/null +++ b/tests/cloud_tests/testcases/examples/writing_out_arbitrary_files.yaml @@ -0,0 +1,45 @@ +# +# From cloud config examples on cloudinit.readthedocs.io +# +# 2016-11-17: Disabled as covered by module based tests +# +enabled: False +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 |