summaryrefslogtreecommitdiff
path: root/doc/rtd/howto/module_run_frequency.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/rtd/howto/module_run_frequency.rst')
-rw-r--r--doc/rtd/howto/module_run_frequency.rst40
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/rtd/howto/module_run_frequency.rst b/doc/rtd/howto/module_run_frequency.rst
new file mode 100644
index 00000000..fc0f8921
--- /dev/null
+++ b/doc/rtd/howto/module_run_frequency.rst
@@ -0,0 +1,40 @@
+.. _module_frequency:
+
+How to change a module's run frequency
+**************************************
+
+You may want to change the default frequency at which a module runs, for
+example, to make the module run on every boot.
+
+To override the default frequency, you will need to modify the module
+list in :file:`/etc/cloud/cloud.cfg`:
+
+1. Change the module from a string (default) to a list.
+2. Set the first list item to the module name and the second item to the
+ frequency.
+
+Example
+=======
+
+The following example demonstrates how to log boot times to a file every boot.
+
+Update :file:`/etc/cloud/cloud.cfg`:
+
+.. code-block:: yaml
+ :name: /etc/cloud/cloud.cfg
+ :emphasize-lines: 3
+
+ cloud_final_modules:
+ # list shortened for brevity
+ - [phone-home, always]
+ - final-message
+ - power-state-change
+
+Then your user data could then be:
+
+.. code-block:: yaml
+
+ #cloud-config
+ phone_home:
+ url: http://example.com/$INSTANCE_ID/
+ post: all