summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/stages.py12
-rw-r--r--cloudinit/transforms/welcome_message.py (renamed from cloudinit/transforms/welcome_msg.py)0
-rw-r--r--config/cloud.cfg12
3 files changed, 20 insertions, 4 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index 70f2bcc9..ba6cb915 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -431,6 +431,18 @@ class Transforms(object):
contents['args'] = item[2:]
if contents:
module_list.append(contents)
+ elif isinstance(item, (dict)):
+ contents = {}
+ valid = False
+ if 'name' in item:
+ contents['mod'] = item['name'].strip()
+ valid = True
+ if 'frequency' in item:
+ contents['freq'] = item['frequency'].strip()
+ if 'args' in item:
+ contents['args'] = item['args'] or []
+ if contents and valid:
+ module_list.append(contents)
else:
raise TypeError(("Failed to read '%s' item in config,"
" unknown type %s") %
diff --git a/cloudinit/transforms/welcome_msg.py b/cloudinit/transforms/welcome_message.py
index 04691d21..04691d21 100644
--- a/cloudinit/transforms/welcome_msg.py
+++ b/cloudinit/transforms/welcome_message.py
diff --git a/config/cloud.cfg b/config/cloud.cfg
index 147e0500..0e431962 100644
--- a/config/cloud.cfg
+++ b/config/cloud.cfg
@@ -18,9 +18,13 @@ preserve_hostname: false
# timeout: 5 # (defaults to 50 seconds)
# max_wait: 10 # (defaults to 120 seconds)
-# The transform modules that run in the 'init' stage
+# The transform that run in the 'init' stage
cloud_init_modules:
- - welcome_msg
+# This is the hash way of specifying a transform
+ - name: welcome_message
+# This argument list will get passed to the transform when activated
+ args:
+ - init
- bootcmd
- resizefs
- set_hostname
@@ -30,7 +34,7 @@ cloud_init_modules:
- rsyslog
- ssh
- # The transform modules that run in the 'config' stage
+ # The transforms that run in the 'config' stage
cloud_config_modules:
- mounts
- ssh-import-id
@@ -49,7 +53,7 @@ cloud_config_modules:
- runcmd
- byobu
-# The transform modules that run in the 'final' stage
+# The transforms that run in the 'final' stage
cloud_final_modules:
- rightscale_userdata
- scripts-per-once