Skip to content

Commit

Permalink
Arch OpenStack: Strip missings groups from cloud-init config (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork committed Jul 23, 2017
1 parent 71d31af commit 76e0a89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions image_bootstrap/distros/arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,16 @@ def get_initramfs_path(self):
def install_kernel(self):
pass # Kernel installed, already

def adjust_cloud_cfg_dict(self, cloud_cfg_dict):
super(ArchStrategy, self).adjust_cloud_cfg_dict(cloud_cfg_dict)

# Get rid of groups cdrom, dailout, dip, netdev, plugdev, sudo.
# https://github.com/hartwork/image-bootstrap/issues/49#issuecomment-317191835
# https://bugs.archlinux.org/task/54911
system_info = cloud_cfg_dict.setdefault('system_info', {})
system_info__default_user = system_info.setdefault('default_user', {})
system_info__default_user['groups'] = ['adm']

def uses_systemd(self):
return True

Expand Down

0 comments on commit 76e0a89

Please sign in to comment.