Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
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).
|
|
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).
|
|
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
|
|
accidentally removed a line between two functions.
|
|
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.
|
|
This simiplifies the logic, by just making it independent of 'system'.
LP: #1096423
|
|
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
|
|
LP: #1096417
|
|
|
|
|
|
LP: #1079002
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
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
|
|
These changes were pulled out of the previous merge (cc_yum_add_repo)
as they were unrelated there. Re-applying them here.
|
|
|
|
when that group configuration is a dict => members.
LP: #1077245
|
|
|
|
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
|
|
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.
|
|
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.
|
|
users groups function when
its provided by the get user
function.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
variables adjusted in sysconfig files are
properly quoted for there common use case,
that being sourced into shell scripts.
|
|
|
|
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.
|
|
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).
|
|
of this function that needs to occur since
its pretty much the same now.
|
|
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
|
|
preparation for having a new branch
for all of these changes.
|
|
and is not a part of a comment or other
part of the line.
|
|
a little more relevant.
|
|
|
|
file is being added actually exists before it
is written into and ensure that the directory
is included in the main sudoers file.
|
|
|