From e40a1c8143ee88e0eb9b979fabff587ec53b971d Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 18 Jan 2011 19:26:57 +0000 Subject: remove 'biultin' config, separate cloud.cfg This set of changes makes '/etc/cloud/cloud.cfg' support "#include" and "#opt_include". The idea is to then provide a base configuration and allow distro or local changes that would override that. --- config/cloud.cfg | 26 +++++++++++++++++++++++++ config/logging.cfg | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 config/cloud.cfg create mode 100644 config/logging.cfg (limited to 'config') diff --git a/config/cloud.cfg b/config/cloud.cfg new file mode 100644 index 00000000..3e7556d2 --- /dev/null +++ b/config/cloud.cfg @@ -0,0 +1,26 @@ +cloud: auto +user: ubuntu +disable_root: 1 +preserve_hostname: False + +cloud_config_modules: + - mounts + - ssh-import-id + - ssh + - grub-dpkg + - apt-update-upgrade + - puppet + - updates-check + - disable-ec2-metadata + - runcmd + - byobu + +## logging.cfg contains info on logging output for cloud-init +#include logging.cfg + +## dpkg-cloud-sources.cfg contains the values +## selected by dpkg configuration +#opt_include distro.cfg + +##local.cfg is for local overrides of any of the above +#opt_include local.cfg diff --git a/config/logging.cfg b/config/logging.cfg new file mode 100644 index 00000000..05e49bb9 --- /dev/null +++ b/config/logging.cfg @@ -0,0 +1,57 @@ +## this yaml formated config file handles setting +## logger information. The values that are necessary to be set +## are seen at the bottom. The top '_log' are only used to remove +## redundency in a syslog and fallback-to-file case. +## +## The 'log_cfgs' entry defines a list of logger configs +## Each entry in the list is tried, and the first one that +## works is used. If a log_cfg list entry is an array, it will +## be joined with '\n'. +_log: + - &log_base | + [loggers] + keys=root,cloudinit + + [handlers] + keys=consoleHandler,cloudLogHandler + + [formatters] + keys=simpleFormatter,arg0Formatter + + [logger_root] + level=DEBUG + handlers=consoleHandler,cloudLogHandler + + [logger_cloudinit] + level=DEBUG + qualname=cloudinit + handlers= + propagate=1 + + [handler_consoleHandler] + class=StreamHandler + level=WARNING + formatter=arg0Formatter + args=(sys.stderr,) + + [formatter_arg0Formatter] + format=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s + + [formatter_simpleFormatter] + format=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s + - &log_file | + [handler_cloudLogHandler] + class=FileHandler + level=DEBUG + formatter=simpleFormatter + args=('/var/log/cloud-init.log',) + - &log_syslog | + [handler_cloudLogHandler] + class=handlers.SysLogHandler + level=DEBUG + formatter=simpleFormatter + args=("/dev/log", handlers.SysLogHandler.LOG_USER) + +log_cfgs: + - [ *log_base, *log_syslog ] + - [ *log_base, *log_file ] -- cgit v1.2.3