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 e2ed364 commit 5cfd2a2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions image_bootstrap/distros/arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,15 @@ 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
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 5cfd2a2

Please sign in to comment.