|
| 1 | +#cloud-config |
| 2 | + |
| 3 | +# This is the user-data configuration file for cloud-init. By default this sets |
| 4 | +# up an initial user called "ubuntu" with password "ubuntu", which must be |
| 5 | +# changed at first login. However, many additional actions can be initiated on |
| 6 | +# first boot from this file. The cloud-init documentation has more details: |
| 7 | +# |
| 8 | +# https://cloudinit.readthedocs.io/ |
| 9 | +# |
| 10 | +# Some additional examples are provided in comments below the default |
| 11 | +# configuration. |
| 12 | + |
| 13 | +# Enable password authentication with the SSH daemon |
| 14 | +ssh_pwauth: true |
| 15 | + |
| 16 | +# On first boot, set the (default) ubuntu user's password to "ubuntu" and |
| 17 | +# expire user passwords |
| 18 | +chpasswd: |
| 19 | + expire: false |
| 20 | + list: |
| 21 | + - ubuntu:ubuntu |
| 22 | + |
| 23 | +## Add users and groups to the system, and import keys with the ssh-import-id |
| 24 | +## utility |
| 25 | +#groups: |
| 26 | +#- robot: [robot] |
| 27 | +#- robotics: [robot] |
| 28 | +#- pi |
| 29 | +# |
| 30 | +#users: |
| 31 | +#- default |
| 32 | +#- name: robot |
| 33 | +# gecos: Mr. Robot |
| 34 | +# primary_group: robot |
| 35 | +# groups: users |
| 36 | +# ssh_import_id: foobar |
| 37 | +# lock_passwd: false |
| 38 | +# passwd: $5$hkui88$nvZgIle31cNpryjRfO9uArF7DYiBcWEnjqq7L1AQNN3 |
| 39 | + |
| 40 | +## Update apt database and upgrade packages on first boot |
| 41 | +#package_update: true |
| 42 | +#package_upgrade: true |
| 43 | + |
| 44 | +## Install additional packages on first boot |
| 45 | +#packages: |
| 46 | +#- pwgen |
| 47 | +#- pastebinit |
| 48 | +#- [libpython2.7, 2.7.3-0ubuntu3.1] |
| 49 | + |
| 50 | +## Write arbitrary files to the file-system (including binaries!) |
| 51 | +#write_files: |
| 52 | +#- path: /etc/default/keyboard |
| 53 | +# content: | |
| 54 | +# # KEYBOARD configuration file |
| 55 | +# # Consult the keyboard(5) manual page. |
| 56 | +# XKBMODEL="pc105" |
| 57 | +# XKBLAYOUT="gb" |
| 58 | +# XKBVARIANT="" |
| 59 | +# XKBOPTIONS="ctrl: nocaps" |
| 60 | +# permissions: '0644' |
| 61 | +# owner: root:root |
| 62 | +#- encoding: gzip |
| 63 | +# path: /usr/bin/hello |
| 64 | +# content: !!binary | |
| 65 | +# H4sIAIDb/U8C/1NW1E/KzNMvzuBKTc7IV8hIzcnJVyjPL8pJ4QIA6N+MVxsAAAA= |
| 66 | +# owner: root:root |
| 67 | +# permissions: '0755' |
| 68 | + |
| 69 | +## Run arbitrary commands at rc.local like time |
| 70 | +runcmd: |
| 71 | +#- [ /usr/bin/start_docker_compose, ] |
| 72 | +#- [ sh, -xc, "echo $(date) ': hello world!'" ] |
| 73 | +#- [ wget, "http://ubuntu.com", -O, /run/mydir/index.html ] |
| 74 | + |
0 commit comments