Skip to content

Commit

Permalink
Add extra_vars support to vagrant setup (#10932)
Browse files Browse the repository at this point in the history
  • Loading branch information
VannTen authored Feb 19, 2024
1 parent 5d822ad commit d40b073
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ $ansible_tags ||= ENV['VAGRANT_ANSIBLE_TAGS'] || ""
$vagrant_dir ||= File.join(File.dirname(__FILE__), ".vagrant")

$playbook ||= "cluster.yml"
$extra_vars ||= {}

host_vars = {}

Expand Down Expand Up @@ -276,6 +277,7 @@ Vagrant.configure("2") do |config|
ansible.host_key_checking = false
ansible.raw_arguments = ["--forks=#{$num_instances}", "--flush-cache", "-e ansible_become_pass=vagrant"]
ansible.host_vars = host_vars
ansible.extra_vars = $extra_vars
if $ansible_tags != ""
ansible.tags = [$ansible_tags]
end
Expand Down
5 changes: 5 additions & 0 deletions docs/vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ cat << EOF > vagrant/config.rb
\$network_plugin = "flannel"
\$inventory = "$INV"
\$shared_folders = { 'temp/docker_rpms' => "/var/cache/yum/x86_64/7/docker-ce/packages" }
\$extra_vars = {
dns_domain: my.custom.domain
}
# or
\$extra_vars = "path/to/extra/vars/file.yml"
EOF

# make the rpm cache
Expand Down

0 comments on commit d40b073

Please sign in to comment.