cloudbase / cloudbase-init

Cross-platform instance initialization
http://openstack.org
Apache License 2.0
421 stars 149 forks source link

Implement cloud-config 'users' and 'groups' support #26

Closed ader1990 closed 4 years ago

ader1990 commented 4 years ago

Cloud-init docs for groups and users:

https://cloudinit.readthedocs.io/en/latest/topics/examples.html#including-users-and-groups

Example userdata file:

#cloud-config

# Add groups to the system
# The following example adds the ubuntu group with members 'root' and 'sys'
# and the empty group cloud-users.
groups:
  - ubuntu: [root,sys]
  - cloud-users

# Add users to the system. Users are added after groups are added.
users:
  - name: foobar
    gecos: Foo B. Bar
    primary_group: foobar
    groups: users
    passwd: StrongPassw0rd
    inactive: False
    expiredate: 2020-10-01
    ssh_authorized_keys:
      - ssh first key
      - ssh second key

The keys following keys are not implemented: