~ubuntu-branches/ubuntu/oneiric/cloud-init/oneiric-updates

« back to all changes in this revision

Viewing changes to .pc/catchup-427-431.patch/doc/examples/cloud-config.txt

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2011-08-23 00:01:01 UTC
  • Revision ID: package-import@ubuntu.com-20110823000101-gnmcdm4wk88sd6vn
Tags: 0.6.1-0ubuntu15
* catch up with trunk at revision 431
* add network debug info to console when cloud-init runs (LP: #828186)
* fix issue where subprocesses (apt-add-repository) where given
  the console and would attempt to prompt user and hang boot (LP: #831505)
* add awareness of ecdsa to cc_ssh

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#cloud-config
 
2
# Update apt database on first boot
 
3
# (ie run apt-get update)
 
4
#
 
5
# Default: true
 
6
#
 
7
apt_update: false
 
8
 
 
9
# Upgrade the instance on first boot
 
10
# (ie run apt-get upgrade)
 
11
#
 
12
# Default: false
 
13
#
 
14
apt_upgrade: true
 
15
 
 
16
# Add apt repositories
 
17
#
 
18
# Default: auto select based on cloud metadata
 
19
#  in ec2, the default is <region>.archive.ubuntu.com
 
20
apt_mirror: http://us.archive.ubuntu.com/ubuntu/
 
21
 
 
22
# Preserve existing /etc/apt/sources.list
 
23
# Default: overwrite sources_list with mirror.  If this is true
 
24
# then apt_mirror above will have no effect
 
25
apt_preserve_sources_list: true
 
26
 
 
27
apt_sources:
 
28
 - source: "deb http://ppa.launchpad.net/byobu/ppa/ubuntu karmic main"
 
29
   keyid: F430BBA5 # GPG key ID published on a key server
 
30
   filename: byobu-ppa.list
 
31
 
 
32
 # PPA shortcut:
 
33
 #  * Setup correct apt sources.list line
 
34
 #  * Import the signing key from LP
 
35
 #
 
36
 #  See https://help.launchpad.net/Packaging/PPA for more information
 
37
 #  this requires 'add-apt-repository'
 
38
 - source: "ppa:smoser/ppa"    # Quote the string
 
39
 
 
40
 # Custom apt repository:
 
41
 #  * all that is required is 'source'
 
42
 #  * Creates a file in /etc/apt/sources.list.d/ for the sources list entry
 
43
 #  * [optional] Import the apt signing key from the keyserver 
 
44
 #  * Defaults:
 
45
 #    + keyserver: keyserver.ubuntu.com
 
46
 #    + filename: cloud_config_sources.list
 
47
 #
 
48
 #    See sources.list man page for more information about the format
 
49
 - source: deb http://archive.ubuntu.com/ubuntu karmic-backports main universe multiverse restricted
 
50
 
 
51
 # sources can use $MIRROR and $RELEASE and they will be replaced
 
52
 # with the local mirror for this cloud, and the running release
 
53
 # the entry below would be possibly turned into:
 
54
 # - source: deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu natty multiverse
 
55
 - source: deb $MIRROR $RELEASE multiverse
 
56
 
 
57
 # this would have the same end effect as 'ppa:byobu/ppa'
 
58
 - source: "deb http://ppa.launchpad.net/byobu/ppa/ubuntu karmic main"
 
59
   keyid: F430BBA5 # GPG key ID published on a key server
 
60
   filename: byobu-ppa.list
 
61
 
 
62
 # Custom apt repository:
 
63
 #  * The apt signing key can also be specified
 
64
 #    by providing a pgp public key block
 
65
 #  * Providing the PBG key here is the most robust method for
 
66
 #    specifying a key, as it removes dependency on a remote key server
 
67
 
 
68
 - source: deb http://ppa.launchpad.net/alestic/ppa/ubuntu karmic main 
 
69
   key: | # The value needs to start with -----BEGIN PGP PUBLIC KEY BLOCK-----
 
70
      -----BEGIN PGP PUBLIC KEY BLOCK-----
 
71
      Version: SKS 1.0.10
 
72
 
 
73
      mI0ESpA3UQEEALdZKVIMq0j6qWAXAyxSlF63SvPVIgxHPb9Nk0DZUixn+akqytxG4zKCONz6
 
74
      qLjoBBfHnynyVLfT4ihg9an1PqxRnTO+JKQxl8NgKGz6Pon569GtAOdWNKw15XKinJTDLjnj
 
75
      9y96ljJqRcpV9t/WsIcdJPcKFR5voHTEoABE2aEXABEBAAG0GUxhdW5jaHBhZCBQUEEgZm9y
 
76
      IEFsZXN0aWOItgQTAQIAIAUCSpA3UQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEA7H
 
77
      5Qi+CcVxWZ8D/1MyYvfj3FJPZUm2Yo1zZsQ657vHI9+pPouqflWOayRR9jbiyUFIn0VdQBrP
 
78
      t0FwvnOFArUovUWoKAEdqR8hPy3M3APUZjl5K4cMZR/xaMQeQRZ5CHpS4DBKURKAHC0ltS5o
 
79
      uBJKQOZm5iltJp15cgyIkBkGe8Mx18VFyVglAZey
 
80
      =Y2oI
 
81
      -----END PGP PUBLIC KEY BLOCK-----
 
82
 
 
83
# Install additional packages on first boot
 
84
#
 
85
# Default: none
 
86
#
 
87
# if packages are specified, this apt_update will be set to true
 
88
#
 
89
packages:
 
90
 - pwgen
 
91
 - pastebinit
 
92
 
 
93
# set up mount points
 
94
# 'mounts' contains a list of lists
 
95
#  the inner list are entries for an /etc/fstab line
 
96
#  ie : [ fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno ]
 
97
#
 
98
# default:
 
99
# mounts:
 
100
#  - [ ephemeral0, /mnt ]
 
101
#  - [ swap, none, swap, sw, 0, 0 ]
 
102
#
 
103
# in order to remove a previously listed mount (ie, one from defaults)
 
104
# list only the fs_spec.  For example, to override the default, of
 
105
# mounting swap:
 
106
# - [ swap ]
 
107
# or
 
108
# - [ swap, null ]
 
109
#
 
110
# - if a device does not exist at the time, an entry will still be
 
111
#   written to /etc/fstab.
 
112
# - '/dev' can be ommitted for device names that begin with: xvd, sd, hd, vd
 
113
# - if an entry does not have all 6 fields, they will be filled in
 
114
#   with values from 'mount_default_fields' below.
 
115
#
 
116
# Note, that you should set 'nobootwait' (see man fstab) for volumes that may
 
117
# not be attached at instance boot (or reboot)
 
118
#
 
119
mounts:
 
120
 - [ ephemeral0, /mnt, auto, "defaults,noexec" ]
 
121
 - [ sdc, /opt/data ]
 
122
 - [ xvdh, /opt/data, "auto", "defaults,nobootwait", "0", "0" ]
 
123
 - [ dd, /dev/zero ]
 
124
 
 
125
# mount_default_fields
 
126
# These values are used to fill in any entries in 'mounts' that are not
 
127
# complete.  This must be an array, and must have 7 fields.
 
128
mount_default_fields: [ None, None, "auto", "defaults,nobootwait", "0", "2" ]
 
129
 
 
130
# add each entry to ~/.ssh/authorized_keys for the configured user
 
131
ssh_authorized_keys:
 
132
  - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEA3FSyQwBI6Z+nCSjUUk8EEAnnkhXlukKoUPND/RRClWz2s5TCzIkd3Ou5+Cyz71X0XmazM3l5WgeErvtIwQMyT1KjNoMhoJMrJnWqQPOt5Q8zWd9qG7PBl9+eiH5qV7NZ mykey@host
 
133
  - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies
 
134
 
 
135
# Send pre-generated ssh private keys to the server
 
136
# If these are present, they will be written to /etc/ssh and
 
137
# new random keys will not be generated
 
138
ssh_keys:
 
139
  rsa_private: |
 
140
    -----BEGIN RSA PRIVATE KEY-----
 
141
    MIIBxwIBAAJhAKD0YSHy73nUgysO13XsJmd4fHiFyQ+00R7VVu2iV9Qcon2LZS/x
 
142
    1cydPZ4pQpfjEha6WxZ6o8ci/Ea/w0n+0HGPwaxlEG2Z9inNtj3pgFrYcRztfECb
 
143
    1j6HCibZbAzYtwIBIwJgO8h72WjcmvcpZ8OvHSvTwAguO2TkR6mPgHsgSaKy6GJo
 
144
    PUJnaZRWuba/HX0KGyhz19nPzLpzG5f0fYahlMJAyc13FV7K6kMBPXTRR6FxgHEg
 
145
    L0MPC7cdqAwOVNcPY6A7AjEA1bNaIjOzFN2sfZX0j7OMhQuc4zP7r80zaGc5oy6W
 
146
    p58hRAncFKEvnEq2CeL3vtuZAjEAwNBHpbNsBYTRPCHM7rZuG/iBtwp8Rxhc9I5w
 
147
    ixvzMgi+HpGLWzUIBS+P/XhekIjPAjA285rVmEP+DR255Ls65QbgYhJmTzIXQ2T9
 
148
    luLvcmFBC6l35Uc4gTgg4ALsmXLn71MCMGMpSWspEvuGInayTCL+vEjmNBT+FAdO
 
149
    W7D4zCpI43jRS9U06JVOeSc9CDk2lwiA3wIwCTB/6uc8Cq85D9YqpM10FuHjKpnP
 
150
    REPPOyrAspdeOAV+6VKRavstea7+2DZmSUgE
 
151
    -----END RSA PRIVATE KEY-----
 
152
 
 
153
  rsa_public: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEAoPRhIfLvedSDKw7XdewmZ3h8eIXJD7TRHtVW7aJX1ByifYtlL/HVzJ09nilCl+MSFrpbFnqjxyL8Rr/DSf7QcY/BrGUQbZn2Kc22PemAWthxHO18QJvWPocKJtlsDNi3 smoser@localhost
 
154
 
 
155
  dsa_private: |
 
156
    -----BEGIN DSA PRIVATE KEY-----
 
157
    MIIBuwIBAAKBgQDP2HLu7pTExL89USyM0264RCyWX/CMLmukxX0Jdbm29ax8FBJT
 
158
    pLrO8TIXVY5rPAJm1dTHnpuyJhOvU9G7M8tPUABtzSJh4GVSHlwaCfycwcpLv9TX
 
159
    DgWIpSj+6EiHCyaRlB1/CBp9RiaB+10QcFbm+lapuET+/Au6vSDp9IRtlQIVAIMR
 
160
    8KucvUYbOEI+yv+5LW9u3z/BAoGBAI0q6JP+JvJmwZFaeCMMVxXUbqiSko/P1lsa
 
161
    LNNBHZ5/8MOUIm8rB2FC6ziidfueJpqTMqeQmSAlEBCwnwreUnGfRrKoJpyPNENY
 
162
    d15MG6N5J+z81sEcHFeprryZ+D3Ge9VjPq3Tf3NhKKwCDQ0240aPezbnjPeFm4mH
 
163
    bYxxcZ9GAoGAXmLIFSQgiAPu459rCKxT46tHJtM0QfnNiEnQLbFluefZ/yiI4DI3
 
164
    8UzTCOXLhUA7ybmZha+D/csj15Y9/BNFuO7unzVhikCQV9DTeXX46pG4s1o23JKC
 
165
    /QaYWNMZ7kTRv+wWow9MhGiVdML4ZN4XnifuO5krqAybngIy66PMEoQCFEIsKKWv
 
166
    99iziAH0KBMVbxy03Trz
 
167
    -----END DSA PRIVATE KEY-----
 
168
 
 
169
  dsa_public: ssh-dss AAAAB3NzaC1kc3MAAACBAM/Ycu7ulMTEvz1RLIzTbrhELJZf8Iwua6TFfQl1ubb1rHwUElOkus7xMhdVjms8AmbV1Meem7ImE69T0bszy09QAG3NImHgZVIeXBoJ/JzByku/1NcOBYilKP7oSIcLJpGUHX8IGn1GJoH7XRBwVub6Vqm4RP78C7q9IOn0hG2VAAAAFQCDEfCrnL1GGzhCPsr/uS1vbt8/wQAAAIEAjSrok/4m8mbBkVp4IwxXFdRuqJKSj8/WWxos00Ednn/ww5QibysHYULrOKJ1+54mmpMyp5CZICUQELCfCt5ScZ9GsqgmnI80Q1h3Xkwbo3kn7PzWwRwcV6muvJn4PcZ71WM+rdN/c2EorAINDTbjRo97NueM94WbiYdtjHFxn0YAAACAXmLIFSQgiAPu459rCKxT46tHJtM0QfnNiEnQLbFluefZ/yiI4DI38UzTCOXLhUA7ybmZha+D/csj15Y9/BNFuO7unzVhikCQV9DTeXX46pG4s1o23JKC/QaYWNMZ7kTRv+wWow9MhGiVdML4ZN4XnifuO5krqAybngIy66PMEoQ= smoser@localhost
 
170
 
 
171
 
 
172
# remove access to the ec2 metadata service early in boot via null route
 
173
#  the null route can be removed (by root) with:
 
174
#    route del -host 169.254.169.254 reject
 
175
# default: false (service available)
 
176
disable_ec2_metadata: true
 
177
 
 
178
# run commands
 
179
# default: none
 
180
# runcmd contains a list of either lists or a string
 
181
# each item will be executed in order at rc.local like level with
 
182
# output to the console
 
183
# - if the item is a list, the items will be properly executed as if
 
184
#   passed to execve(3) (with the first arg as the command).
 
185
# - if the item is a string, it will be simply written to the file and
 
186
#   will be interpreted by 'sh'
 
187
#
 
188
# Note, that the list has to be proper yaml, so you have to escape
 
189
# any characters yaml would eat (':' can be problematic)
 
190
runcmd:
 
191
 - [ ls, -l, / ]
 
192
 - [ sh, -xc, "echo $(date) ': hello world!'" ]
 
193
 - [ sh, -c, echo "=========hello world'=========" ]
 
194
 - ls -l /root
 
195
 - [ wget, "http://slashdot.org", -O, /tmp/index.html ]
 
196
 
 
197
 
 
198
# boot commands
 
199
# default: none
 
200
# this is very similar to runcmd above, but commands run very early
 
201
# in the boot process, only slightly after a 'boothook' would run.
 
202
# bootcmd should really only be used for things that could not be
 
203
# done later in the boot process.  bootcmd is very much like
 
204
# boothook, but possibly with more friendly
 
205
bootcmd:
 
206
 - echo 192.168.1.130 us.archive.ubuntu.com > /etc/hosts
 
207
 
 
208
# cloud_config_modules:
 
209
# default:
 
210
# cloud_config_modules:
 
211
# - mounts
 
212
# - ssh
 
213
# - apt-update-upgrade
 
214
# - puppet
 
215
# - updates-check
 
216
# - disable-ec2-metadata
 
217
# - runcmd
 
218
#
 
219
# This is an array of arrays or strings.
 
220
# if item is a string, then it is read as a module name
 
221
# if the item is an array it is of the form:
 
222
#   name, frequency, arguments
 
223
# where 'frequency' is one of:
 
224
#   once-per-instance
 
225
#   always
 
226
# a python file in the CloudConfig/ module directory named 
 
227
# cc_<name>.py
 
228
# example:
 
229
cloud_config_modules:
 
230
 - mounts
 
231
 - ssh-import-id
 
232
 - ssh
 
233
 - grub-dpkg
 
234
 - [ apt-update-upgrade, always ]
 
235
 - puppet
 
236
 - updates-check
 
237
 - disable-ec2-metadata
 
238
 - runcmd
 
239
 - byobu
 
240
 
 
241
# ssh_import_id: [ user1, user2 ]
 
242
# ssh_import_id will feed the list in that variable to
 
243
#  ssh-import-id, so that public keys stored in launchpad
 
244
#  can easily be imported into the configured user
 
245
# This can be a single string ('smoser') or a list ([smoser, kirkland])
 
246
ssh_import_id: [smoser]
 
247
 
 
248
# Provide debconf answers
 
249
#
 
250
# See debconf-set-selections man page.
 
251
#
 
252
# Default: none
 
253
 
254
debconf_selections: |     # Need to perserve newlines
 
255
        # Force debconf priority to critical.
 
256
        debconf debconf/priority select critical
 
257
 
 
258
        # Override default frontend to readline, but allow user to select.
 
259
        debconf debconf/frontend select readline
 
260
        debconf debconf/frontend seen false
 
261
 
 
262
# manage byobu defaults
 
263
# byobu_by_default:
 
264
#   'user' or 'enable-user': set byobu 'launch-by-default' for the default user
 
265
#   'system' or 'enable-system' or 'enable':
 
266
#      enable 'launch-by-default' for all users, do not modify default user
 
267
#   'disable': disable both default user and system
 
268
#   'disable-system': disable system
 
269
#   'disable-user': disable for default user
 
270
#   not-set: no changes made
 
271
byobu_by_default: system
 
272
 
 
273
# disable ssh access as root.
 
274
# if you want to be able to ssh in to the system as the root user
 
275
# rather than as the 'ubuntu' user, then you must set this to false
 
276
# default: true
 
277
disable_root: false
 
278
 
 
279
# disable_root_opts: the value of this variable will prefix the
 
280
# respective key in /root/.ssh/authorized_keys if disable_root is true
 
281
# see 'man authorized_keys' for more information on what you can do here
 
282
#
 
283
# The string '$USER' will be replaced with the username of the default user
 
284
#
 
285
# disable_root_opts: no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"$USER\" rather than the user \"root\".';echo;sleep 10"
 
286
 
 
287
 
 
288
# set the locale to a given locale
 
289
# default: en_US.UTF-8
 
290
locale: en_US.UTF-8
 
291
 
 
292
# add entries to rsyslog configuration
 
293
# The first occurance of a given filename will truncate. 
 
294
# subsequent entries will append.
 
295
# if value is a scalar, its content is assumed to be 'content', and the
 
296
# default filename is used.
 
297
# if filename is not provided, it will default to 'rsylog_filename'
 
298
# if filename does not start with a '/', it will be put in 'rsyslog_dir'
 
299
# rsyslog_dir default: /etc/rsyslog.d
 
300
# rsyslog_filename default: 20-cloud-config.conf
 
301
rsyslog:
 
302
 - ':syslogtag, isequal, "[CLOUDINIT]" /var/log/cloud-foo.log'
 
303
 - content: "*.*   @@192.0.2.1:10514"
 
304
 - filename: 01-examplecom.conf
 
305
   content: |
 
306
   *.*   @@syslogd.example.com
 
307
 
 
308
# resize_rootfs should the / filesytem be resized on first boot
 
309
# this allows you to launch an instance with a larger disk / partition
 
310
# and have the instance automatically grow / to accomoddate it
 
311
# set to 'False' to disable
 
312
resize_rootfs: True
 
313
 
 
314
## hostname and /etc/hosts management
 
315
# cloud-init will do its best to set up a sane hostname and corresponding
 
316
# entries in /etc/hosts.
 
317
#
 
318
# if you do nothing, you should get the system generally correctly
 
319
# configured.
 
320
#  * /etc/hostname (and thus `hostname` output) set with hostname (not fqdn)
 
321
#  * an entry in /etc/hosts for both hostname and fqdn
 
322
#    that are obtained from the metadata service
 
323
#  * On each boot, the above will again be set
 
324
#  * cloud-init generally "owns" the 127.0.1.1 entry.  The
 
325
#    rest of the file will not be modified
 
326
#
 
327
# You can change the above behavior with the following config variables:
 
328
#  Remember that these can be set in cloud-config via user-data,
 
329
#  /etc/cloud/cloud.cfg or any file in /etc/cloud/cloud.cfg.d/
 
330
#
 
331
# hostname:
 
332
#   this option will be used wherever the 'hostname' is needed
 
333
#   simply substitute it in the description above.
 
334
#   ** If you wish to set your hostname, set it here **
 
335
#   default: 'hostname' as returned by the metadata service
 
336
#       on EC2, the hostname portion of 'local-hostname' is used
 
337
#       which is something like 'ip-10-244-170-199'
 
338
#
 
339
# fqdn:
 
340
#   this option will be used wherever 'fqdn' is needed.
 
341
#   simply substitue it in the description above.
 
342
#   default: fqdn as returned by the metadata service.  on EC2 'hostname'
 
343
#       is used, so this is like: ip-10-244-170-199.ec2.internal
 
344
 
345
# manage_etc_hosts:
 
346
#   default: false
 
347
#   Setting this config variable to 'true' will mean that on every
 
348
#   boot, /etc/hosts will be re-written from /etc/cloud/templates/hosts.tmpl
 
349
#   The strings '$hostname' and '$fqdn' are replaced in the template
 
350
#   with the appropriate values.
 
351
#
 
352
# preserve_hostname:
 
353
#   default: False
 
354
#   If this option is set to True, then /etc/hostname will never updated
 
355
#   The default behavior is to update it if it has not been modified by
 
356
#   the user.
 
357
 
 
358
# final_message
 
359
# default: cloud-init boot finished at $TIMESTAMP. Up $UPTIME seconds
 
360
# this message is written by cloud-final when the system is finished
 
361
# its first boot
 
362
final_message: "The system is finally up, after $UPTIME seconds"
 
363
 
 
364
# configure where output will go
 
365
# 'output' entry is a dict with 'init', 'config', 'final' or 'all'
 
366
# entries.  Each one defines where 
 
367
#  cloud-init, cloud-config, cloud-config-final or all output will go
 
368
# each entry in the dict can be a string, list or dict.
 
369
#  if it is a string, it refers to stdout and stderr
 
370
#  if it is a list, entry 0 is stdout, entry 1 is stderr
 
371
#  if it is a dict, it is expected to have 'output' and 'error' fields
 
372
# default is to write to console only
 
373
# the special entry "&1" for an error means "same location as stdout"
 
374
#  (Note, that '&1' has meaning in yaml, so it must be quoted)
 
375
output:
 
376
 init: "> /var/log/my-cloud-init.log"
 
377
 config: [ ">> /tmp/foo.out", "> /tmp/foo.err" ]
 
378
 final:
 
379
   output: "| tee /tmp/final.stdout | tee /tmp/bar.stdout"
 
380
   error: "&1"
 
381
 
 
382
 
 
383
# phone_home: if this dictionary is present, then the phone_home
 
384
# cloud-config module will post specified data back to the given
 
385
# url
 
386
# default: none
 
387
# phone_home:
 
388
#  url: http://my.foo.bar/$INSTANCE/
 
389
#  post: all
 
390
#  tries: 10
 
391
#
 
392
phone_home:
 
393
 url: http://my.example.com/$INSTANCE_ID/
 
394
 post: [ pub_key_dsa, pub_key_rsa, instance_id ]
 
395
 
 
396
# timezone: set the timezone for this instance
 
397
# the value of 'timezone' must exist in /usr/share/zoneinfo
 
398
timezone: US/Eastern
 
399
 
 
400
# def_log_file and syslog_fix_perms work together
 
401
# if 
 
402
# - logging is set to go to a log file 'L' both with and without syslog
 
403
# - and 'L' does not exist
 
404
# - and syslog is configured to write to 'L'
 
405
# then 'L' will be initially created with root:root ownership (during
 
406
# cloud-init), and then at cloud-config time (when syslog is available)
 
407
# the syslog daemon will be unable to write to the file.
 
408
 
409
# to remedy this situation, 'def_log_file' can be set to a filename
 
410
# and syslog_fix_perms to a string containing "<user>:<group>"
 
411
#
 
412
# the default values are '/var/log/cloud-init.log' and 'syslog:adm'
 
413
# the value of 'def_log_file' should match what is configured in logging
 
414
# if either is empty, then no change of ownership will be done
 
415
def_log_file: /var/log/my-logging-file.log
 
416
syslog_fix_perms: syslog:root
 
417
 
 
418
# you can set passwords for a user or multiple users
 
419
# this is off by default.
 
420
# to set the default user's password, use the 'password' option.
 
421
# if set, to 'R' or 'RANDOM', then a random password will be
 
422
# generated and written to stdout (the console)
 
423
# password: passw0rd
 
424
#
 
425
# also note, that this will expire the password, forcing a change
 
426
# on first login. If you do not want to expire, see 'chpasswd' below.
 
427
#
 
428
# By default in the UEC images password authentication is disabled
 
429
# Thus, simply setting 'password' as above will only allow you to login
 
430
# via the console.
 
431
#
 
432
# in order to enable password login via ssh you must set
 
433
# 'ssh_pwauth'.
 
434
# If it is set, to 'True' or 'False', then sshd_config will be updated
 
435
# to ensure the desired function.  If not set, or set to '' or 'unchanged'
 
436
# then sshd_config will not be updated.
 
437
# ssh_pwauth: True
 
438
#
 
439
# there is also an option to set multiple users passwords, using 'chpasswd'
 
440
# That looks like the following, with 'expire' set to 'True' by default.
 
441
# to not expire users passwords, set 'expire' to 'False':
 
442
# chpasswd:
 
443
#  list: |
 
444
#    user1:password1
 
445
#    user2:RANDOM
 
446
#  expire: True
 
447
# ssh_pwauth: [ True, False, "" or "unchanged" ]
 
448
#
 
449
# So, a simple working example to allow login via ssh, and not expire
 
450
# for the default user would look like:
 
451
password: passw0rd
 
452
chpasswd: { expire: False }
 
453
ssh_pwauth: True
 
454
 
 
455
# manual cache clean.
 
456
#  By default, the link from /var/lib/cloud/instance to
 
457
#  the specific instance in /var/lib/cloud/instances/ is removed on every
 
458
#  boot.  The cloud-init code then searches for a DataSource on every boot
 
459
#  if your DataSource will not be present on every boot, then you can set
 
460
#  this option to 'True', and maintain (remove) that link before the image
 
461
#  will be booted as a new instance.
 
462
# default is False
 
463
manual_cache_clean: False
 
464
 
 
465
# When cloud-init is finished running including having run 
 
466
# cloud_init_modules, then it will run this command.  The default
 
467
# is to emit an upstart signal as shown below.  If the value is a
 
468
# list, it will be passed to Popen.  If it is a string, it will be
 
469
# invoked through 'sh -c'.
 
470
 
471
# default value:
 
472
# cc_ready_cmd: [ initctl, emit, cloud-config, CLOUD_CFG=/var/lib/instance//cloud-config.txt ]
 
473
# example:
 
474
# cc_ready_cmd: [ sh, -c, 'echo HI MOM > /tmp/file' ]
 
475