Skip to content

Commit

Permalink
client-desktop: implementing the best one hack to get VBox shared fol…
Browse files Browse the repository at this point in the history
…ders working with LDAP (closes #317)
  • Loading branch information
imincik committed Nov 26, 2015
1 parent a005bfe commit 93cb35a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
3 changes: 3 additions & 0 deletions system/admin/gislab-adduser
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ gislab_info "Adding user account"
# create LDAP account (without creating home directory - CREATEHOMES="no")
ldapadduser $GISLAB_USER gislabusers

# add user to VirtualBox file sharing group
gislab-moduser -a vboxsf $GISLAB_USER

# add user to supplementary group(s)
if [ -n "$opt_groups" ]; then
gislab-moduser -a $opt_groups $GISLAB_USER
Expand Down
16 changes: 14 additions & 2 deletions system/roles/client-desktop/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,15 @@
executable: /bin/bash


# install VirtualBox Guest additions
# Install VirtualBox Guest additions
# Latest kernel version supported by VirtualBox Guest additions on Ubuntu 12.04
# is version 3.8. For manual installation run following command:
# $ dkms install -m virtualbox-guest/<vbox-version> -k <kernel-version>/<ARCH>

# We always reinstall (--reinstall) packages to fix broken cross-compilation,
# happening when modules are rebuild on system upgrade by DKMS trigger without
# proper configuration of BUILD_TARGET_ARCH variable.

- name: Install VirtualBox Guest additions
shell: >
if [ '{{ GISLAB_CLIENT_ARCHITECTURE }}' == 'amd64' ]; then
Expand All @@ -358,13 +363,20 @@
fi
&&
chroot {{ root_dir }}/root
apt-get --no-install-recommends {{ apt_get_opts }} install {{ item }}
apt-get
--reinstall
--no-install-recommends {{ apt_get_opts }} install {{ item }}
with_items:
- virtualbox-guest-dkms virtualbox-guest-x11 virtualbox-guest-utils
args:
executable: /bin/bash
when: GISLAB_CLIENT_VIRTUALBOX_SUPPORT

- name: Remove local VirtualBox file sharing group (vboxsf)
shell: >
chroot {{ root_dir }}/root
groupdel vboxsf || true
# remove not needed packages
- name: Remove packages
Expand Down
6 changes: 6 additions & 0 deletions system/roles/service-ldap/templates/ldap/gislab-tree.ldif.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ objectClass: posixGroup
cn: gislabusers
gidNumber: 3001
description: GIS.lab Users Group

dn: cn=vboxsf,ou=Groups,dc=gis,dc=lab
objectClass: posixGroup
cn: vboxsf
gidNumber: 3100
description: VirtualBox File Sharing Group

0 comments on commit 93cb35a

Please sign in to comment.