diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2014-11-21 17:15:24 -0800 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2014-11-21 17:15:24 -0800 |
commit | e0db600c791b84ab36da1541919ee8b497946d0d (patch) | |
tree | ff56be746c7ba6e30ea21dafbb5db921709d035d /cloudinit/util.py | |
parent | 6fac0f6ee9308782cafba65dfde7daafec4c563f (diff) | |
parent | 249c6c5980c36832ddd03ff6c3272f534538efc0 (diff) | |
download | vyos-cloud-init-e0db600c791b84ab36da1541919ee8b497946d0d.tar.gz vyos-cloud-init-e0db600c791b84ab36da1541919ee8b497946d0d.zip |
Increase the robustness/configurability of the chef module...
Add the following adjustments to the chef template and module:
- Make it so that the chef directories can be provided (defaults
to the existing directories)
- Make the params much more configurable, and if a parameter is
provided in the chef configuration it will override existing template
parameters.
- Make the template skip lines if the values are None in the configuration
so that template lines can be removed if/when this is desirable.
- Allow the firstboot json path to be configurable (defaults to the
existing location).
- Adds a basic set of tests to ensure that good things are happening.
- Make a helper function to tell if already installed.
- Have the install routine not run chef after installed but have it instead
return a result to tell the caller to run the chef program once completed.
- Use the generated_by() utility function to give the ruby template a
better header comment.
- Set special parameters after selecting the basic chef parameters.
- Allow for the running after install and run arguments to be configured.
- Allow the omnibus url fetching retries to be configurable.
- Move the chef running to its own helper function
- Add module docs
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 4bb73c11..b71057fb 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -399,6 +399,10 @@ def get_cfg_option_str(yobj, key, default=None): return val +def get_cfg_option_int(yobj, key, default=0): + return int(get_cfg_option_str(yobj, key, default=default)) + + def system_info(): return { 'platform': platform.platform(), |