add docker-ce to docker subtype grains check

Fixes #44292
This commit is contained in:
Daniel Wallace 2017-10-30 09:22:08 -06:00
parent bebc33daf5
commit a30af3252e
No known key found for this signature in database
GPG key ID: 5FA5E5544F010D48

View file

@ -699,9 +699,10 @@ def _virtual(osdata):
with salt.utils.fopen('/proc/1/cgroup', 'r') as fhr:
if ':/lxc/' in fhr.read():
grains['virtual_subtype'] = 'LXC'
dstrings = (':/system.slice/docker', ':/docker/', ':/docker-ce/')
with salt.utils.fopen('/proc/1/cgroup', 'r') as fhr:
fhr_contents = fhr.read()
if ':/docker/' in fhr_contents or ':/system.slice/docker' in fhr_contents:
if any(dstring in fhr_contents for dstring in dstrings):
grains['virtual_subtype'] = 'Docker'
except IOError:
pass