From 2c95e4cf2a61d13de72833c79d04648ba1687ef9 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 6 Apr 2016 11:03:55 -0400 Subject: support adding the primary group also --- cloudinit/distros/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 5563ae43..71da7ec5 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -371,6 +371,10 @@ class Distro(object): kwargs['groups'] = ",".join(groups) else: groups = groups.split(",") + + primary_group = kwargs.get('primary_group') + if primary_group: + groups.append(primary_group) if create_groups and groups: for group in groups: -- cgit v1.2.3