Skip to content

Commit

Permalink
Fix install-docker role
Browse files Browse the repository at this point in the history
systemctl is not available on Ubuntu 14.04, so using
"service docker restart" as a workaround.

Related-Bug: theopenlab/openlab#308
  • Loading branch information
kiwik committed Jun 29, 2019
1 parent fe47b0a commit d066fcc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions roles/install-docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Restart docker.
systemctl daemon-reload
systemctl restart docker
# NOTE: systemctl is not available in Ubuntu 14.04
if [[ "{{ global_env.OS_BRANCH }}" == "stable/mitaka" ]];then
# Restart docker.
service docker restart
else
# Restart docker.
systemctl daemon-reload
systemctl restart docker
fi
executable: /bin/bash

0 comments on commit d066fcc

Please sign in to comment.