Skip to content
Snippets Groups Projects
Unverified Commit c2fb1a07 authored by Kenichi Omichi's avatar Kenichi Omichi Committed by GitHub
Browse files

Add VAGRANT_ANSIBLE_TAGS for normal deployment (#8697)

Current ansible.tags 'facts' is for skipping actual Kubespray deployment
at vagrant CI because the deployment takes much time. However the static
'facts' skips the deployment for normal usage of vagrant also.
That causes confusions.

This adds VAGRANT_ANSIBLE_TAGS to skip the deployment for vagrant CI.
parent 00a4d2d3
No related branches found
No related tags found
No related merge requests found
...@@ -75,6 +75,7 @@ $local_path_provisioner_claim_root ||= "/opt/local-path-provisioner/" ...@@ -75,6 +75,7 @@ $local_path_provisioner_claim_root ||= "/opt/local-path-provisioner/"
$libvirt_nested ||= false $libvirt_nested ||= false
# boolean or string (e.g. "-vvv") # boolean or string (e.g. "-vvv")
$ansible_verbosity ||= false $ansible_verbosity ||= false
$ansible_tags ||= ENV['VAGRANT_ANSIBLE_TAGS'] || ""
$playbook ||= "cluster.yml" $playbook ||= "cluster.yml"
...@@ -256,7 +257,9 @@ Vagrant.configure("2") do |config| ...@@ -256,7 +257,9 @@ Vagrant.configure("2") do |config|
ansible.host_key_checking = false ansible.host_key_checking = false
ansible.raw_arguments = ["--forks=#{$num_instances}", "--flush-cache", "-e ansible_become_pass=vagrant"] ansible.raw_arguments = ["--forks=#{$num_instances}", "--flush-cache", "-e ansible_become_pass=vagrant"]
ansible.host_vars = host_vars ansible.host_vars = host_vars
ansible.tags = ['facts'] if $ansible_tags != ""
ansible.tags = [$ansible_tags]
end
ansible.groups = { ansible.groups = {
"etcd" => ["#{$instance_name_prefix}-[1:#{$etcd_instances}]"], "etcd" => ["#{$instance_name_prefix}-[1:#{$etcd_instances}]"],
"kube_control_plane" => ["#{$instance_name_prefix}-[1:#{$kube_master_instances}]"], "kube_control_plane" => ["#{$instance_name_prefix}-[1:#{$kube_master_instances}]"],
......
...@@ -5,6 +5,7 @@ FROM quay.io/kubespray/kubespray:${KUBESPRAY_VERSION} ...@@ -5,6 +5,7 @@ FROM quay.io/kubespray/kubespray:${KUBESPRAY_VERSION}
ENV VAGRANT_VERSION=2.2.19 ENV VAGRANT_VERSION=2.2.19
ENV VAGRANT_DEFAULT_PROVIDER=libvirt ENV VAGRANT_DEFAULT_PROVIDER=libvirt
ENV VAGRANT_ANSIBLE_TAGS=facts
RUN apt-get update && apt-get install -y wget libvirt-dev openssh-client rsync git RUN apt-get update && apt-get install -y wget libvirt-dev openssh-client rsync git
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment