summaryrefslogtreecommitdiff
path: root/cloudinit/distros
AgeCommit message (Collapse)Author
2012-09-28rpm spec and rpm build, better handle case with no package_mirrorsJoshua Harlow
2012-09-28Also ensure that if mirror info is not invalidJoshua Harlow
before we start iterating over it (it could be sent is as none).
2012-09-28Stop the bad habit of using 'or'.Joshua Harlow
2012-09-27cleanup the user/group listsJoshua Harlow
The primary utility here is normalize_user_groups, which would be called by config modules to get a list of users or groups. This centralizes what was copied code into this one location.
2012-09-25Resync with head.Joshua Harlow
2012-09-25Allow package_mirrors to be non-existent.Joshua Harlow
2012-09-24Avoid rechecking if old users is availabile.Joshua Harlow
2012-09-24Handle the case where 'user' is defined but 'users' isn't.Joshua Harlow
2012-09-24Add a netconfig format test + if rhel is passed the 'all'Joshua Harlow
device name, throw an error since rhel can not currently handle this case.
2012-09-24Update to bring inline with trunk/head.Joshua Harlow
2012-09-24Refactor the ug normalization to take in a distroJoshua Harlow
and produce a user and group list. Clean this up to be simpler as well as handle the old 'user' case when it exists in configuration.
2012-09-24cleanups for rhel network configJoshua Harlow
Rework the rhel sysconfig writing/updating so that it goes through a single function which helps ensure correctness. Also write to /etc/sysconfig/network when we have written out devices to ensure that networking is on.
2012-09-24fix pep8Scott Moser
2012-09-24Oopies, missed u.Joshua Harlow
2012-09-24Bring up to date with trunk.Joshua Harlow
2012-09-24handle ifup on RH distros by iterating over 'ifup devname'Joshua Harlow
Fix the ifup so that if a list of devices is provided then each interface is brought up individually instead of using the '--all' which isn't on rhel. The default debian behavior will be to use this still though as it overrides the new bring up interfaces function for this case.
2012-09-24fix make pep8Scott Moser
2012-09-23Make the normalization a module level functionJoshua Harlow
since it has little dependence on the distros class itself. Readjust the using code to use this new module level function instead.
2012-09-22Use 0440 permissions on sudoers, not 0644Garrett Holmstrom
2012-09-21Fix some docs + pylint warnings + log on default created in the module.Joshua Harlow
2012-09-21Also allow the user list to come in as a commaJoshua Harlow
separated list so that its types match more of what the group list can be.
2012-09-211. Cleanup the user creation so that the distro class isJoshua Harlow
responsible only for creating users and groups and normalizing a input configuration into a normalized format that splits up the user list, the group list and the default user listsand let the add user/group config module handle calling those methods to add its own users/groups and the default user (if any). 2. Also add in tests for this normalization process to ensure that it is pretty bug free and works with the different types of formats that users/groups/defaults + options can take.
2012-09-20Instead of special casing the empty listJoshua Harlow
we are going to check for the 'all' entry and if that exists then only fire off one call (since debian supports this).
2012-09-19Use a common header creation functionJoshua Harlow
to avoid duplicating the same code in this file.
2012-09-19Rework the rhel sysconfig writing/updatingJoshua Harlow
so that it goes through a single function which helps ensure correctness. Also write to /etc/sysconfig/network when we have written out devices to ensure that networking is on.
2012-09-19Fix the ifup so that if a list of devices is providedJoshua Harlow
then each interface is brought up individually instead of using the '--all' which isn't on rhel. The default debian behavior will be to use this still though as it overrides the new bring up interfaces function for this case.
2012-09-19fix 'update_package_sources' on rhel to only update package sourcesGarrett Holmstrom
update_package_sources on RHEL called "yum update", which actually upgrades packages on the system. Thix fix makes it instead call "yum makecache" instead.
2012-09-19Add the translation from the ubuntu format for nameservers and dns searchJoshua Harlow
servers and add in the writing of /etc/resolv.conf in rhel from that translation.
2012-09-19do not write a comment in /etc/hostname.Scott Moser
Network Manager (LP: #1053048), and apparently fedora/redhat do not like comments in this file. LP: #1052664
2012-09-19Actually download yum metadata with update_package_sourcesGarrett Holmstrom
2012-09-19write trailing newlines on generated filesScott Moser
This adds trailing newlines to /etc/default/locale, /etc/hostname, /etc/timezone.
2012-09-19Add support for 'selinux_user' key to useradd cloud-config syntaxGarrett Holmstrom
Fedora and RHEL and friends' useradd program supports an "--selinux-user" option that sets what SELinux user a new user should log in with. This commit introduces an "selinux-user" directive to cloud-config "users" lists that exposes this option.
2012-09-18Make update_package_sources stop upgrading packages on RHELGarrett Holmstrom
2012-09-18Add support for useradd --selinux-user''Garrett Holmstrom
2012-09-17Fill in basic info for the Fedora distroGarrett Holmstrom
2012-08-31Removed admin group from default Ubuntu user group list.Ben Howard
Fixed change password behavior to work with new user list handling (LP: #1044553)
2012-08-31- Converted user list to user dict to allow exclusion of the default userBen Howard
on Ubuntu systems via cloud-config (LP: #1041384). - Fixed bug with user creation on Ubuntu where the default user groups are not set properly (LP: #1044044). - Fixed documentation for user creation (LP: #1044508).
2012-08-28distros/ubuntu.py: remove unused import (pylint)Scott Moser
2012-08-27Fixed critical bug where user and group creation was being done after SSHBen Howard
configurations were applied. The result of this bug was that cloud-config supplied SSH public keys would fail to apply since the configured user may or may not exist. (LP: #1042459). cloudinit/config/cc_ssh_import_id.py: ssh_import_id.py now handles all user SSH import IDs. cloudinit/distros/ubuntu.py: Removed create_user class override as cruft, since ssh_import_id now handles all users. config/cloud.cfg: Moved users_groups to run under cloud_init_modules. doc/examples/cloud-config.txt: Added missing documentation on user and group creation.
2012-08-22do not attempt the useradd command if user existsScott Moser
Previously we were only logging that the user existed and then still trying to run the command (which would raise error) As a result, none of the rest of the things would be done (sshimport id and such)
2012-08-22pep8 fixesScott Moser
2012-08-22fix duplicate flags being passed to useraddScott Moser
Fix bug here: adduser_cmd = ['useradd', name] x_adduser_cmd = adduser_cmd is different than x_adduser_cmd = ['useradd', name] The problem was they referenced the same list, and we were doubly appending.
2012-08-22remove now pointless __init__ in ubuntuScott Moser
2012-08-22distros: add_default_user is no longer abstractScott Moser
2012-08-22fix issues from 'make pylint'Scott Moser
In an effort to pylint errors about NonImlementedError and add_default_user, I moved this method to distro and genericized it. Now, assuming a sane 'create_user' for the distro, this should work. Also: * removed the unused set_configured_user method
2012-08-22fix errors from 'make pep8'Scott Moser
2012-08-22Merge with lp:cloud-initBen Howard
2012-08-22Simplified users[0] detection, and ensured compatability with previous user ↵Ben Howard
password control code
2012-08-22improve the check for "uses unknown key" in mirror templatesScott Moser
instead of substituting and then checking for presense of a unlikely to occur string, this only adds to the search list if there is no KeyError raised.
2012-08-22fix for pep8 issues and seemingly functional now.Scott Moser