vagrant/plugins/provisioners/ansible/plugin.rb

81 lines
2.2 KiB
Ruby
Raw Normal View History

2013-03-20 14:41:21 +00:00
require "vagrant"
module VagrantPlugins
module Ansible
class Plugin < Vagrant.plugin("2")
2013-03-20 14:41:21 +00:00
name "ansible"
description <<-DESC
Provides support for provisioning your virtual machines with Ansible
from the Vagrant host (`ansible`) or from the guests (`ansible_local`).
2013-03-20 14:41:21 +00:00
DESC
config("ansible", :provisioner) do
require_relative "config/host"
Config::Host
end
config("ansible_local", :provisioner) do
require_relative "config/guest"
Config::Guest
end
provisioner("ansible") do
require_relative "provisioner/host"
Provisioner::Host
end
provisioner("ansible_local") do
require_relative "provisioner/guest"
Provisioner::Guest
end
guest_capability(:linux, :ansible_installed) do
require_relative "cap/guest/posix/ansible_installed"
Cap::Guest::POSIX::AnsibleInstalled
end
guest_capability(:freebsd, :ansible_installed) do
require_relative "cap/guest/posix/ansible_installed"
Cap::Guest::POSIX::AnsibleInstalled
2013-03-20 14:41:21 +00:00
end
guest_capability(:arch, :ansible_install) do
require_relative "cap/guest/arch/ansible_install"
Cap::Guest::Arch::AnsibleInstall
2013-03-20 14:41:21 +00:00
end
guest_capability(:debian, :ansible_install) do
require_relative "cap/guest/debian/ansible_install"
Cap::Guest::Debian::AnsibleInstall
end
guest_capability(:ubuntu, :ansible_install) do
require_relative "cap/guest/ubuntu/ansible_install"
Cap::Guest::Ubuntu::AnsibleInstall
end
guest_capability(:fedora, :ansible_install) do
require_relative "cap/guest/fedora/ansible_install"
Cap::Guest::Fedora::AnsibleInstall
end
guest_capability(:redhat, :ansible_install) do
require_relative "cap/guest/redhat/ansible_install"
Cap::Guest::RedHat::AnsibleInstall
end
guest_capability(:suse, :ansible_install) do
require_relative "cap/guest/suse/ansible_install"
Cap::Guest::SUSE::AnsibleInstall
end
guest_capability(:freebsd, :ansible_install) do
require_relative "cap/guest/freebsd/ansible_install"
Cap::Guest::FreeBSD::AnsibleInstall
end
2013-03-20 14:41:21 +00:00
end
end
end