February 2017
Intermediate to advanced
440 pages
8h 45m
English
An early need we all face is to have a file, a license, or a script in place right from the beginning of the instance life. Cloud-init proposes different ways of sending those files over the new instance. We'll see how to send files using plain text and base64 data encodings.
To step through this recipe, you will need:
The first file we'll write is a MOTD (short for Message Of The Day) with root read-write permissions, read-only for everyone else. This file will have its content declared right from the cloud-config file:
#cloud-config write_files: - path: /etc/motd content: | This server is configured using cloud-init. Welcome. owner: root:root ...
Read now
Unlock full access