summaryrefslogtreecommitdiff
path: root/cloudinit/config
AgeCommit message (Collapse)Author
2012-08-22fix pep8 complaints.Scott Moser
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
2012-08-22fix pylint in cc_ssh_authkey_fingerprints.pyScott Moser
2012-08-21remove committed conflicts in previous mergeScott Moser
2012-08-20remove duplicate printing of authorized keys to the consoleScott Moser
see LP: #1039303 for more information. Hopefully we'll get a good fix there.
2012-08-20authkey_fingerprints: Fix columns headers, do not print empty linesScott Moser
This fixes the column headers and and adds a check to make sure that a key given is one that we actually want to print out. Also add in a config option which lets people select a different hashing method (not md5 if they want).
2012-08-20Add the "None" datasourceScott Moser
The None datasource is the last resort fallback datasource. It is identifiable by a property 'is_disconnected' that indicates that the datasource used is "not connected to a datasource". This will allow any thing that needs to run to still run in the absense of a DataSource. Also, we add a logging of the datasource found in final_message, and a warning if the None datasource is found. LP: #906669
2012-08-20add ssh-authkey-fingerprint config module, to print fingerprints to consoleScott Moser
Example output: ci-info: +---------+-------------------------+---------+-----------------+ ci-info: | Keytype | Fingerprint (md5) | Options | Comment | ci-info: +---------+-------------------------+---------+-----------------+ ci-info: | ssh-rsa | e3:..:84:81:72:38:..:6a | - | smoser@brickies | ci-info: | ssh-rsa | 21:..:32:8a:da:98:..:42 | - | smoser@bart | ci-info: | ssh-rsa | 7b:..:ac:a7:17:51:..:b2 | - | smoser@kaypeah | ci-info: +---------+-------------------------+---------+-----------------+
2012-08-20Fixup the columns and add a check to makeJoshua Harlow
sure that a key given is one that we actually want to print out. Also add in a config option which lets people select a different hashing method (not md5 if they want).
2012-08-18Add support for printing out the authkey's for the default user.Joshua Harlow
1. Adjust the sshutil so that it has functions for doing this (used by the previous functions) 2. Create a new module that pretty prints out the given authorized keys fetched (if any) using the standard md5 scheme (for now), this module can be disabled by setting 'no_ssh_fingerprints' or just removing it from the running list.
2012-08-10Adjustments so that the default old event is used whenJoshua Harlow
no args are provided. Adjust the config file to use this older method so that older changes aren't needed. Also when calling 'initctl' emit fails log the exception message so that some useful warning information can be produced.
2012-08-09Move the code that did the 'cloud-config' upstart event name emitting to Joshua Harlow
a config module and make it more generic in that it can take in a list of event names to emit as arguments. Add a yaml example to replace the functionality removed from the main binary.
2012-08-03use get_cfg_option_bool for apt_mirror_search_dnsScott Moser
2012-08-03do not search for mirror named '<distro>-mirror' in dns by defaultScott Moser
As described in the bug, enough non-cloud users experienced issues with cloud-init selecting a mirror due to consumer level network providers using dns server redirection. We're turning this off by default. LP: #974509
2012-07-11add write-files module for "injecting" files (LP: #1012854)Scott Moser
This implements file writing via cloud-config. It also * adjusts other code to have user/group parsing in util instead of in stages.py, * renames decomp_str to decomp_gzip since it is more meaningful when named that (as thats all it can decompress). LP: #1012854
2012-07-11Update the write files with the new content/compression handling.Joshua Harlow
Adjust the examples file to reflect this.
2012-07-11Fix log message after 'write_files' key change.Joshua Harlow
2012-07-11Adjust the decoding of the files that are given so that a canonicalizeJoshua Harlow
happens first, which will examine the incoming encoding, and decide the neccasary decoding types needed to get the final resultant string and then use these normalized decoding types to actually do the final decode. Also change the name of the config key that is looked up to 'write_files' since 'files' is pretty generic and could have clashes with other modules. Add an example that shows how to use this in the different encoding formats that are supported.
2012-07-10Fixes 1012854 by implementing file writing, adjustsJoshua Harlow
other code to have user/group parsing in util instead of in stages.py, renames decomp_str to decomp_gzip since it is more meaningful when named that (as thats all it can decompress).
2012-07-10cc_resizefs: show more specific time.Scott Moser
Show 3 decimal places for how long a resize took. 1 second granularity was too large.
2012-07-09cc_final_message: fix pylint issueScott Moser
2012-07-09url_helper.py, cc_rightscale_userdata.py: reduce WARN to DEBUGScott Moser
cc_rightscale_userdata.py is likely to not be found, so its WARN was annoying in that it got to console output. The same is true of url_helper. Not all uses of readurl were fatal or justified to warn if the content was not there.
2012-07-09Revert back to using cheetah + adjust resultant code + templatesJoshua Harlow
At this point there is a mixture of "double hash" cheetah comments and '#*' cheetah comments.
2012-07-06Updated so that if no mirror is found, the module stops running.Joshua Harlow
2012-07-021. Move the welcome message template string to a constant at the top of the ↵Joshua Harlow
module 2. Fix the usage of multi_log to log to only one of the places (for now) 3. Update comment about multi-log and why write_file isn't used in this case
2012-07-01Merge in pending changes.harlowja
2012-07-011. Rename util functions to is_true and is_falseharlowja
2. Move the config loading functions to where they are used (in stages) 3. Adjust cc_set_passwords to use the is_true and is_false renamed functions 4. Adjust the init stage to have a _read_base_config function used to load the base 'initial' configuration from the following locations a. Kernel cmdline b. Conf.d location (+ the cloud.cfg location) c. Built-in configuration
2012-07-01Add a multi log function that can write to stderr, console and a log debug, ↵Joshua Harlow
useful in certain cases
2012-06-29[merge from trunk] cc_salt_minion: install package salt-minion rather than saltScott Moser
2012-06-23Fix a bunch of == None casesharlowja
2012-06-22Use os.path.join instead of custom string path formationJoshua Harlow
2012-06-221. Move the getkeybyid function back here but add some slight adjustmentsJoshua Harlow
a. Instead of executing a bash string, write out a temporary file and then just execute '/bin/sh' on that file with the right arguments instead. 2. Rename util.SilentTemporaryFile to util.ExtendedTemporaryFile and update the usages of the previous name accordingly, this better reflects what this temp file is. 3. More teenie pep8 line length fixings
2012-06-221. Adjust the logging of phone home module when its not enabledharlowja
2. Fix pylint warning in userdata about unused variable
2012-06-22Turn off capturingJoshua Harlow
2012-06-22Turn off capturingJoshua Harlow
2012-06-22Turn off capturingJoshua Harlow
2012-06-22Turn off capturingJoshua Harlow
2012-06-22Use a module level constant for the filenameJoshua Harlow
2012-06-22Fix ma englishJoshua Harlow
2012-06-22Disable capturing of these subp callsJoshua Harlow
2012-06-22Add in debian, which should also workJoshua Harlow
2012-06-22Configobj should be a requirement now, and not optional,harlowja
so there is no need to check the import for errors.
2012-06-221. Use configobj instead of configparserharlowja
a. This allows us to not have to add a fake section in b. It will also preserver the files initial comments 2. Adjust how the new sections are being added and values are being written due to this change
2012-06-21Use RuntimeError subclass instead of top level ExceptionJoshua Harlow
2012-06-21Updated so that the locale that is being written out currently in 'cc_locale'Joshua Harlow
now will be done by the distro classes (since its not the same for rhel and ubuntu). Remove the template also since it will just be created by the ubuntu distro class (its just one line).
2012-06-21Testing is easier if we just pass the paths object, instead of the full ↵Joshua Harlow
cloud object here.
2012-06-21Simplify sshd config loading to make it use one set of functions/objects/classesJoshua Harlow
2012-06-211. Renames for debug message from 'transform' to 'module'harlowja
2. Fixing up more cloud.path.joins found to use the right ro/rw filename
2012-06-21Move to a write location and when writing, also write to the write location, ↵harlowja
instead of the read-only one
2012-06-201. Add an importer function that will search for a given module in a set of ↵Joshua Harlow
search module 'prefixes' that also has a potential set of required attributes. 2. Use this new importer to find the distro class, the userdata handler modules, the config modules and the datasource modules, if none can be found error out accordingly.
2012-06-20Massive pylint + pep8 fixups!Joshua Harlow