summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-01-18 19:26:57 +0000
committerScott Moser <smoser@ubuntu.com>2011-01-18 19:26:57 +0000
commite40a1c8143ee88e0eb9b979fabff587ec53b971d (patch)
tree1872b28fa73e186900fac0926f46f52df9fcc670 /config
parent1a35587abb5226c3b008f1a034c56145cb878489 (diff)
downloadvyos-cloud-init-e40a1c8143ee88e0eb9b979fabff587ec53b971d.tar.gz
vyos-cloud-init-e40a1c8143ee88e0eb9b979fabff587ec53b971d.zip
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.
Diffstat (limited to 'config')
-rw-r--r--config/cloud.cfg26
-rw-r--r--config/logging.cfg57
2 files changed, 83 insertions, 0 deletions
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 ]