0
我正在使用Vagrant和ansible_local供應商。有沒有辦法指定Ansible將從哪裏下載? install_mode只選擇如何安裝Ansible,而不是從哪裏安裝。從本地機器上安裝流浪客人Ansible
*編輯 用「where」表示指定下載位置。
我正在使用Vagrant和ansible_local供應商。有沒有辦法指定Ansible將從哪裏下載? install_mode只選擇如何安裝Ansible,而不是從哪裏安裝。從本地機器上安裝流浪客人Ansible
*編輯 用「where」表示指定下載位置。
看起來你不能指定下載源位置。 APT,RPM或pip安裝命令都是在Vagrant中硬編碼的。例如:
ansible_install.rb(用於Debian):
def self.ansible_apt_install(machine)
// skipped
machine.communicate.sudo install_backports_if_wheezy_release
machine.communicate.sudo "apt-get update -y -qq"
machine.communicate.sudo "apt-get install -y -qq ansible"
end
def self.pip_setup(machine)
machine.communicate.sudo "apt-get update -y -qq"
machine.communicate.sudo "apt-get install -y -qq build-essential curl git libssl-dev libffi-dev python-dev"
Pip::get_pip machine
end
pip.rb(使用:pip
時):
machine.communicate.sudo "pip install #{upgrade_arg}#{package}#{version_arg}"
這就是說,如果你想避免做下載每個vagrant up
,您可以:
謝謝,不知道Vagrant Packer,會檢查出來。 – ilanco