provisioners/docker: Move DockerConfigureVagrantUser capability up to Linux guests [GH-2649]
This commit is contained in:
parent
5a842fc609
commit
6f304d5e29
|
@ -1,7 +1,7 @@
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module Docker
|
module Docker
|
||||||
module Cap
|
module Cap
|
||||||
module Debian
|
module Linux
|
||||||
module DockerConfigureVagrantUser
|
module DockerConfigureVagrantUser
|
||||||
def self.docker_configure_vagrant_user(machine)
|
def self.docker_configure_vagrant_user(machine)
|
||||||
machine.communicate.sudo("usermod -a -G docker #{machine.config.ssh.username || "vagrant"}")
|
machine.communicate.sudo("usermod -a -G docker #{machine.config.ssh.username || "vagrant"}")
|
|
@ -1,13 +0,0 @@
|
||||||
module VagrantPlugins
|
|
||||||
module Docker
|
|
||||||
module Cap
|
|
||||||
module Redhat
|
|
||||||
module DockerConfigureVagrantUser
|
|
||||||
def self.docker_configure_vagrant_user(machine)
|
|
||||||
machine.communicate.sudo("usermod -a -G docker #{machine.config.ssh.username || "vagrant"}")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -24,11 +24,6 @@ module VagrantPlugins
|
||||||
Cap::Debian::DockerConfigureAutoStart
|
Cap::Debian::DockerConfigureAutoStart
|
||||||
end
|
end
|
||||||
|
|
||||||
guest_capability("debian", "docker_configure_vagrant_user") do
|
|
||||||
require_relative "cap/debian/docker_configure_vagrant_user"
|
|
||||||
Cap::Debian::DockerConfigureVagrantUser
|
|
||||||
end
|
|
||||||
|
|
||||||
guest_capability("debian", "docker_start_service") do
|
guest_capability("debian", "docker_start_service") do
|
||||||
require_relative "cap/debian/docker_start_service"
|
require_relative "cap/debian/docker_start_service"
|
||||||
Cap::Debian::DockerStartService
|
Cap::Debian::DockerStartService
|
||||||
|
@ -44,11 +39,6 @@ module VagrantPlugins
|
||||||
Cap::Redhat::DockerConfigureAutoStart
|
Cap::Redhat::DockerConfigureAutoStart
|
||||||
end
|
end
|
||||||
|
|
||||||
guest_capability("redhat", "docker_configure_vagrant_user") do
|
|
||||||
require_relative "cap/redhat/docker_configure_vagrant_user"
|
|
||||||
Cap::Redhat::DockerConfigureVagrantUser
|
|
||||||
end
|
|
||||||
|
|
||||||
guest_capability("redhat", "docker_start_service") do
|
guest_capability("redhat", "docker_start_service") do
|
||||||
require_relative "cap/redhat/docker_start_service"
|
require_relative "cap/redhat/docker_start_service"
|
||||||
Cap::Redhat::DockerStartService
|
Cap::Redhat::DockerStartService
|
||||||
|
@ -59,6 +49,11 @@ module VagrantPlugins
|
||||||
Cap::Linux::DockerInstalled
|
Cap::Linux::DockerInstalled
|
||||||
end
|
end
|
||||||
|
|
||||||
|
guest_capability("linux", "docker_configure_vagrant_user") do
|
||||||
|
require_relative "cap/linux/docker_configure_vagrant_user"
|
||||||
|
Cap::Linux::DockerConfigureVagrantUser
|
||||||
|
end
|
||||||
|
|
||||||
provisioner(:docker) do
|
provisioner(:docker) do
|
||||||
require_relative "provisioner"
|
require_relative "provisioner"
|
||||||
Provisioner
|
Provisioner
|
||||||
|
|
Loading…
Reference in New Issue