← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~raharper/cloud-init:snapuser-create into cloud-init:master

 

The proposal to merge ~raharper/cloud-init:snapuser-create into cloud-init:master has been updated.

Description changed to:

Add support for snap create-user on Ubuntu Core images

Ubuntu Core images use the `snap create-user` to add users to a Ubuntu
Core system.  Add support for creating snap users by added a key to
the users dictionary:

users:
  - name: bob
    snapuser: bob@xxxxxxxxx

Or via the 'snappy' dictionary:

snappy:
  email: bob@xxxxxxxxx
  
These methods will contact the Ubuntu SSO infrastructure to request
user information (including public ssh keys if present) for creating
the user.

Users may also create a snap user without contacting the SSO by
providing a 'system-user' assertion by importing them into snapd.

snappy:
  email: bob@xxxxxxxxx
  known: true
  assertions:
  - |
    <assertion text here>

Additionally, Ubuntu Core systems have a read-only /etc/passwd such that
the normal useradd/groupadd commands do not function without an additional
flag, '--extrausers', which redirects the pwd to /var/lib/extrausers.

Move the system_is_snappy() check from cc_snappy module to util for
re-use and then update the Distro class to append '--extrausers' if
the system is Ubuntu Core.





For more details, see:
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/304700
-- 
Your team cloud init development team is requested to review the proposed merge of ~raharper/cloud-init:snapuser-create into cloud-init:master.


References