summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-04-06 11:03:55 -0400
committerScott Moser <smoser@ubuntu.com>2016-04-06 11:03:55 -0400
commit2c95e4cf2a61d13de72833c79d04648ba1687ef9 (patch)
tree342f4e9ea2b04702629772aca73c0b40c994fc2d /cloudinit/distros
parent638191cd07ba1afe5ea61ff5268351ab77541139 (diff)
downloadvyos-cloud-init-2c95e4cf2a61d13de72833c79d04648ba1687ef9.tar.gz
vyos-cloud-init-2c95e4cf2a61d13de72833c79d04648ba1687ef9.zip
support adding the primary group also
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/__init__.py4
1 files changed, 4 insertions, 0 deletions
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: