Age | Commit message (Collapse) | Author |
|
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.
|
|
since it has little dependence on the distros
class itself. Readjust the using code to use
this new module level function instead.
|
|
|
|
separated list so that its types match more of
what the group list can be.
|
|
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.
|
|
update_package_sources on RHEL called "yum update", which actually
upgrades packages on the system. Thix fix makes it instead call "yum
makecache" instead.
|
|
servers and add in the writing of /etc/resolv.conf in rhel from that
translation.
|
|
Network Manager (LP: #1053048), and apparently fedora/redhat do not like
comments in this file.
LP: #1052664
|
|
|
|
This adds trailing newlines to /etc/default/locale, /etc/hostname,
/etc/timezone.
|
|
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.
|
|
|
|
|
|
|
|
Fixed change password behavior to work with new user list handling
(LP: #1044553)
|
|
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).
|
|
|
|
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.
|
|
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)
|
|
|
|
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.
|
|
|
|
|
|
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
|
|
|
|
|
|
password control code
|
|
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.
|
|
|
|
|
|
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
|
|
There are several changes here.
* Datasource now has a 'availability_zone' getter.
* get_package_mirror_info
* Datasource convenience 'get_package_mirror_info' that calls
the configured distro, and passes it the availability-zone
* distro has a get_package_mirror_info method
* get_package_mirror_info returns a dict that of name:mirror
this is to facilitate use of 'security' and 'primary' archive.
* this supports searching based on templates. Any template
that references undefined values is skipped. These templates
can contain 'availability_zone' (LP: #1037727)
* distro's mirrors can be arch specific (LP: #1028501)
* rename_apt_lists supports the "mirror_info" rather than single mirror
* generate_sources_list supports mirror_info, and as a result, the
ubuntu mirrors reference '$security' rather than security (LP: #1006963)
* remove the DataSourceEc2 specific mirror selection, but instead
rely on the above filtering, and the fact that 'ec2_region' is only
defined if the availability_zone looks like a ec2 az.
|
|
|
|
command to use log options over short
|
|
users and the default user on Ubuntu.
cloudinit/config/cc_users_groups.py: new cloud-config module for creating
users and groups on instance initialization.
- Creates users and group
- Sets "user" directive used in ssh_import_id
cloudinit/config/cc_ssh_import_id.py: module will rely upon users_groups
for setting the default user. Removed assumption of 'ubuntu' user.
cloudinit/distros/__init__.py: Added new abstract methods for getting
and creating the default user.
cloudinit/distros/ubuntu.py: Defined abstract methods for getting and
and creating the default 'ubuntu' user on Ubuntu instances.
cloudinit/util.py: Added ability to hide command run through util.subp to
prevent the commands from showing in the logs. Used by user_groups
cloud-config module.
config/cloud.cfg: Removed "user: ubuntu" directive and replaced with new
user-less syntax.
doc/examples/cloud-config.txt: Documented the creation of users and groups.
|
|
servers and add in the writing of /etc/resolv.conf in rhel from that translation.
|
|
|
|
Previously update_package_sources was a private class
(_update_package_sources). The apt_update_upgrade class called it.
It does make sense that things would want to call this independently
of installing packages. Therefore, expose it as a non hidden method.
|
|
|
|
leaving those unquoted
2. Add more comments as to why we are leaving single quoted
strings alone.
|
|
of the keys and values in sysconfig specially by
ensuring that it does the quoting so that the files
written out can be sourced into bash scripts, which
is typically what these files are used for.
|
|
2. Move the ubuntu class to the debian class (since thats really what it is)
|
|
may already exist in these files
|
|
|
|
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).
|
|
|
|
2. Adjust comment on sources list from depends
3. For the /etc/timezone 'writing', add a header that says created by cloud-init
|
|
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.
|
|
|
|
|