blob: fc0f8921a01bce8a14a2573f71efbaa1567072d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|