diff --git a/contrib/ansible/vagrant/README.md b/contrib/ansible/vagrant/README.md index d225d4af2d0..b870751926f 100644 --- a/contrib/ansible/vagrant/README.md +++ b/contrib/ansible/vagrant/README.md @@ -56,4 +56,10 @@ vagrant provision ### VirtualBox Nothing special with VirtualBox. Hopefully `vagrant up` just works. + +## Random Information +If you just want to update the binaries on your systems (either pkgManager or localBuild) you can do so using the ansible binary-update tag. To do so with vagrant provision you would need to run +``` +ANSIBLE_TAGS="binary-update" vagrant provision +``` [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/contrib/ansible/vagrant/README.md?pixel)]() diff --git a/contrib/ansible/vagrant/Vagrantfile b/contrib/ansible/vagrant/Vagrantfile index b39ec415851..f6505a484b0 100644 --- a/contrib/ansible/vagrant/Vagrantfile +++ b/contrib/ansible/vagrant/Vagrantfile @@ -8,6 +8,7 @@ require "yaml" require 'vagrant-openstack-provider' $num_nodes = (ENV['NUM_NODES'] || 2).to_i +ansible_tags = ENV['ANSIBLE_TAGS'] VAGRANTFILE_API_VERSION = "2" @@ -119,13 +120,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| n.vm.hostname = name set_provider(n) - # This set up the vagrant hosts before we run the main playbook - # Today this just creates /etc/hosts so machines can talk via their - # 'internal' IPs instead of the openstack public ip. - n.vm.provision :ansible do |ansible| - ansible.groups = groups - ansible.playbook = "./vagrant-ansible.yml" - ansible.limit = "all" #otherwise the metadata wont be there for ipv4? + if ansible_tags.nil? + # This set up the vagrant hosts before we run the main playbook + # Today this just creates /etc/hosts so machines can talk via their + # 'internal' IPs instead of the openstack public ip. + n.vm.provision :ansible do |ansible| + ansible.groups = groups + ansible.playbook = "./vagrant-ansible.yml" + ansible.limit = "all" #otherwise the metadata wont be there for ipv4? + end end # This sets up both flannel and kube. @@ -133,6 +136,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| ansible.groups = groups ansible.playbook = "../cluster.yml" ansible.limit = "all" #otherwise the metadata wont be there for ipv4? + ansible.tags = ansible_tags end end end