-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker provision to support centos guest, not RHEL guest
- Loading branch information
Showing
5 changed files
with
35 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
plugins/provisioners/docker/cap/centos/docker_start_service.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module VagrantPlugins | ||
module DockerProvisioner | ||
module Cap | ||
module Centos | ||
module DockerStartService | ||
def self.docker_start_service(machine) | ||
case machine.guest.capability("flavor") | ||
when :centos | ||
machine.communicate.tap do |comm| | ||
comm.sudo("service docker start") | ||
comm.sudo("chkconfig docker on") | ||
end | ||
else | ||
machine.communicate.tap do |comm| | ||
comm.sudo("systemctl start docker.service") | ||
comm.sudo("systemctl enable docker.service") | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
16 changes: 0 additions & 16 deletions
16
plugins/provisioners/docker/cap/redhat/docker_start_service.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters