Skip to content

Commit

Permalink
Merge pull request #115 from Ichimonji10/docker
Browse files Browse the repository at this point in the history
Fix command which populates /etc/sysconfig/docker
  • Loading branch information
JacobCallahan committed Jan 16, 2015
2 parents 298c1cd + 52a84c8 commit 549d462
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions automation_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,14 @@ def setup_default_docker():

# SElinux workaround let us use ``http://localhost:2375`` for a
# ``Docker`` Compute Resurce.
options = ' '.join([
'--selinux-enabled',
'-H tcp://0.0.0.0:2375',
'-H unix:///var/run/docker.sock',
])
if os_version >= 7:
run('echo OPTIONS={0} >> /etc/sysconfig/docker'.format(options))
else:
run(
r'echo other_args=\"{0}\" >> /etc/sysconfig/docker'.format(options)
)
run('sed -i -e "s|^{0}=.*|{0}=\'{1}\'|" /etc/sysconfig/docker'.format(
'OPTIONS' if os_version >= 7 else 'other_args',
' '.join([
'--selinux-enabled true',
'--host tcp://0.0.0.0:2375',
'--host unix:///var/run/docker.sock',
])
))

# Restart ``docker`` service
if os_version >= 7:
Expand Down

0 comments on commit 549d462

Please sign in to comment.