text 使用Ansible置备的示例Vagrantfile

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 使用Ansible置备的示例Vagrantfile相关的知识,希望对你有一定的参考价值。

# Vagrantfile
Vagrant.require_version ">= 1.7.0"

Vagrant.configure(2) do |config|

  config.vm.define "ubuntu_xenial", primary: true do |host|
    host.vm.box = "ubuntu/xenial64"
  end

  config.vbguest.auto_update = true

  # WORKAROUND: enable vboxsf synchronisation as default /vagrant mount point is not synced
  config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

  config.vm.provider "virtualbox" do |vb|
    vb.memory = "512"
    vb.linked_clone = true
    # Enable IO Host Cache
    vb.customize [
          "storagectl", :id,
          "--name", "SATA Controller",
          "--hostiocache", "on"
      ]
  end

  # Disable the new default behavior introduced in Vagrant 1.7, to
  # ensure that all Vagrant machines will use the same SSH key pair.
  # See https://github.com/mitchellh/vagrant/issues/5005
  config.ssh.insert_key = false

  config.vm.provision "ansible", preserve_order: true, run: "always" do |ansible|
    # ansible.verbose = "v"
    ansible.playbook = "site.yml"
    ansible.config_file = "test/ansible.cfg"

    ansible.groups = {
      "buildservers" => ["ubuntu_xenial"]
    }

    ansible.host_vars = {
      "buildservers" => {"install" => "yes"}
    }
  end
end

以上是关于text 使用Ansible置备的示例Vagrantfile的主要内容,如果未能解决你的问题,请参考以下文章

VMware vSphere中三种磁盘:精简置备/厚置备置零/厚置备延迟置零

VMWARE ESXI 虚拟硬盘的格式:精简置备厚置备延迟置零厚置备置零

VMWARE ESXI 虚拟硬盘的格式:精简置备厚置备延迟置零厚置备置零

VMware厚置备延迟置零,厚置备置零,精简置备具体解释

vmware磁盘置备啥意思

text 使用Ansible Local在服务器上安装Ansible角色