summaryrefslogtreecommitdiff
path: root/cloudinit/distros
AgeCommit message (Collapse)Author
2013-03-07allow customization of apt-get command, add --force-unsafe-ioScott Moser
This allows the customization of the apt-get command used for installing packages, and also adds '--force-unsafe-io'. Because this is spawned from cloud-init, it seems to make sense as a first boot package installation option.
2013-03-07pep8 and pylint fixesScott Moser
2013-03-06Continue working on merging code.Joshua Harlow
2013-01-27Adding package versioning logic to package_commandCraig Tracey
This change adds the ability to provide specific package versions to Distro.install_packages and subsequently Distro.package_command. In order to effectively use Distro.install_packages, one is now able to pass a variety of formats in order to easily manage package requirements. These are examples of what can be passed: - "package" - ["package1","package2"] - ("package",) - ("package", "version") - [("package1",)("package2",)] - [("package1", "version1"),("package2","version2")] This change also adds the option to install a specific version for the puppet configuration module. This is especially important here as successful puppet deployments are highly reliant on specific puppet versions.
2013-01-24Merge the old user style with the distro provided config.harlowja
When the old user: style entry is found, don't forget that we need to use the distro settings that are provided but override the name with the new name, this is now accomplished by merging them together in the correct order (using the standard cloud-init merging algo).
2013-01-19Merge the old user style with the distro provided config.harlowja
When the old user: style entry is found, don't forget that we need to use the distro settings that are provided but override the name with the new name, this is now accomplished by merging them together in the correct order (using the standard cloud-init merging algo).
2013-01-18Adjust how the legacy user: XYZ config alters the normalized user listJoshua Harlow
Previously if a legacy user: XYZ entry was found, XYZ would not automatically be promoted to the default user but would instead just be added on as a new entry to the normalized user list. It appears the behavior that is wanted is for the XYZ entry to be added on as the default user (thus overriding a distro provided default user), which better matches how the code previous worked. LP: #1100920
2013-01-15cleanup a pep8 failurectracey
accidentally removed a line between two functions.
2013-01-15add support for operating system familiesctracey
often it is convenient to classify a distro as being part of an operating system family. for instance, file templates may be identical for both debian and ubuntu, but to support this under the current templating code, one would need multiple templates for the same code. similarly, configuration handlers often fall into the same bucket: the configuraton is known to work/has been tested on a particular family of operating systems. right now this is handled with a declaration like: distros = ['fedora', 'rhel'] this fix seeks to address both of these issues. it allows for the simplification of the above line to: osfamilies = ['redhat'] and provides a mechanism for operating system family templates.
2013-01-07fix 'lock_password' for cloud-config user setupScott Moser
This simiplifies the logic, by just making it independent of 'system'. LP: #1096423
2013-01-05Fix the password locking logic.Joshua Harlow
Instead of only not locking when system is present the logic should handle the correct case when lock password is set and system is not present. LP: #1096423
2013-01-05Make which fields are redacted come from a field array.Joshua Harlow
LP: #1096417
2012-11-20pep8 and pylintScott Moser
2012-11-15Raise a type error when a sudoers rule is not an accepted type.Joshua Harlow
2012-11-14Fix sudoers being written multiple times when strings are used.Joshua Harlow
LP: #1079002
2012-11-13Update how errors are handled when writing and reading hostnames.Joshua Harlow
2012-11-13Only attempt to read the previous hostname file if it exists.Joshua Harlow
Instead of always reading the previous hostname file even if it did not exist lets only read it if it is a valid variable and is actually a existent file instead of just attempting to read it always. LP: #1078452
2012-11-12Remove these lines which are not needed.Joshua Harlow
2012-11-12Pylint and pep8 cleanups.Joshua Harlow
2012-11-12Fix variable.Joshua Harlow
2012-11-12Rebased with HEAD and resolved conflicts.Joshua Harlow
2012-11-12Cleanup of /etc/hosts ordering and pep8/pylint adjustments.Joshua Harlow
Fix how the comparison of a fqdn and its aliases was done via sorting instead of existence checking which is the better way to check if a alias already exists as well as cleanup the new files pep8/pylint issues. LP: #1078097
2012-11-10whitespace / indentation cleanupsScott Moser
These changes were pulled out of the previous merge (cc_yum_add_repo) as they were unrelated there. Re-applying them here.
2012-11-10Sudoers.d creation cleanups + tests.Joshua Harlow
2012-11-09Fix the merging of group configurationJoshua Harlow
when that group configuration is a dict => members. LP: #1077245
2012-11-09Fix pep8 warnings.Joshua Harlow
2012-11-08Fix the case where on a redhat based systemJoshua Harlow
the fully qualified domain name should end up in /etc/sysconfig/network by passing the fqdn to the update and set hostname methods and using it accordingly. LP: #1076759
2012-10-27Helpful cleanups.harlowja
1. Remove the usage of the path.join function now that all code should be going through the util file methods (and they can be mocked out as needed). 2. Adjust all occurences of the above join function to either not use it or replace it with the standard os.path.join (which can also be mocked out as needed) 3. Fix pylint from complaining about the tests folder 'helpers.py' not being found 4. Add a pylintrc file that is used instead of the options hidden in the 'run_pylint' tool.
2012-10-23use only util methods for reading/loading/appending/peekingScott Moser
Use only util methods for reading/loading/appending/peeking at files since it is likely soon that we will add a new way of adjusting the root of files read, also it is useful for debugging to track what is being read/written in a central fashion.
2012-10-23No need for the get defaultJoshua Harlow
users groups function when its provided by the get user function.
2012-10-23Make sure that /etc/sudoers.d is used by /etc/sudoersScott Moser
Create /etc/sudoers.d if not present. Attempt to determine if /etc/sudoers.d will be used by /etc/sudoers. If determined not, then add a line to /etc/sudoers.
2012-10-23fix pep8/pylintScott Moser
2012-10-23move default user info out of code and into configScott Moser
Remove the need to have 'default_user' and 'default_user_groups' groups be hard coded into the distro class, instead let that set of configuration be located in the config file where it should be specified instead.
2012-10-11Add some more sysconfig tests + pylint cleanups.Joshua Harlow
2012-10-11Fix the single item string quoting function.Joshua Harlow
2012-10-11Handle the case where the value contains shellJoshua Harlow
variables to be expanded which when using pipes.quote will now not be expanded, so add some checks to ensure that this case will still happen.
2012-10-11Update to use pipes.quote to ensure that Joshua Harlow
variables adjusted in sysconfig files are properly quoted for there common use case, that being sourced into shell scripts.
2012-10-11Update log message to use the more appropriate 'non-persistently' wording.Joshua Harlow
2012-10-11More adjustments/cleanups for the system configurationJoshua Harlow
helper objects. 1. Add in a parser for the /etc/hostname file that can be shared 2. Adjust the sysconfig configobj parser to not always quote fields that it does not need to quote + add in tests around this to ensure that we don't go nuts with quoting again.
2012-10-10Add comment explaining why the '_apply_hostname'Joshua Harlow
function will not be permanent and catch the exception that occurs if it fails and log that instead of blowing up (which isn't typically useful for something that is temporary anyway).
2012-10-10Add comments as to a future refactoringJoshua Harlow
of this function that needs to occur since its pretty much the same now.
2012-10-10System config niceness!Joshua Harlow
1. Move out the old helpers that provided oop access/reading/writing to various standard conf files and place those in parsers instead. 2. Unify the 'update_hostname' which varied very little between distros and make it generic so that subclasses can only provide a couple of functions to obtain the hostname updating functionality 3. Implement that new set of functions in rhel/debian 4. Use the new parsers chop_comment function for similar use cases as well as add a new utils make header function that can be used for configuration files that are newly generated to use (less duplication here of this same thing being done in multiple places. 5. Add in a distro '_apply_hostname' which calls out to the 'hostname' program to set the system hostname (more duplication elimination). 6. Make the 'constant' filenames being written to for configuration by the various distros be instance members instead of string constants 'sprinkled' throughout the code
2012-10-10Merge the resolv.conf branch inJoshua Harlow
preparation for having a new branch for all of these changes.
2012-09-30Ensure that the include dir starts the lineJoshua Harlow
and is not a part of a comment or other part of the line.
2012-09-28Update the log statement used here to beJoshua Harlow
a little more relevant.
2012-09-28Dir should be 0755, not 0440Joshua Harlow
2012-09-28Ensure that the directory where the sudoersJoshua Harlow
file is being added actually exists before it is written into and ensure that the directory is included in the main sudoers file.
2012-09-28Sync with head and fix conflicts.Joshua Harlow
2012-09-28Rework the rest of the locations that usedJoshua Harlow
the previous 'user' and make those locations go through the new distros functions to select the default user or the user list (depending on usage). Adjust the tests to check the new 'default' field that signifies the default user + test the new method to extract just the default user from a normalized user dictionary.
2012-09-28rpm spec and rpm build, better handle case with no package_mirrorsJoshua Harlow