diff --git a/roles/kubernetes/kubeadm/tasks/main.yml b/roles/kubernetes/kubeadm/tasks/main.yml index 6923ac6f477c430f0f6b247d5b740678a57403a6..3b6fe89740bf503b2cd007cc05a84a685571bb9d 100644 --- a/roles/kubernetes/kubeadm/tasks/main.yml +++ b/roles/kubernetes/kubeadm/tasks/main.yml @@ -30,23 +30,26 @@ - kubeadm_ca_stat.stat.exists delegate_to: "{{ groups['kube-master'][0] }}" run_once: true + changed_when: false - name: Create kubeadm token for joining nodes with 24h expiration (default) command: "{{ bin_dir }}/kubeadm token create" register: temp_token delegate_to: "{{ groups['kube-master'][0] }}" when: kubeadm_token is not defined + changed_when: false - name: Set kubeadm_token to generated token set_fact: kubeadm_token: "{{ temp_token.stdout }}" when: kubeadm_token is not defined -- name: gets the kubeadm version +- name: Get the kubeadm version command: "{{ bin_dir }}/kubeadm version -o short" register: kubeadm_output + changed_when: false -- name: sets kubeadm api version to v1beta2 +- name: Set kubeadm api version to v1beta2 set_fact: kubeadmConfig_api_version: v1beta2 diff --git a/roles/kubernetes/master/tasks/kubeadm-setup.yml b/roles/kubernetes/master/tasks/kubeadm-setup.yml index d34128553262da6ecda09db30b4da52d29086e6d..920286eab35c2fbfb01ca02b239375c8131f9e6c 100644 --- a/roles/kubernetes/master/tasks/kubeadm-setup.yml +++ b/roles/kubernetes/master/tasks/kubeadm-setup.yml @@ -164,6 +164,7 @@ shell: >- {{ bin_dir }}/kubeadm --kubeconfig /etc/kubernetes/admin.conf token delete {{ kubeadm_token }} || :; {{ bin_dir }}/kubeadm --kubeconfig /etc/kubernetes/admin.conf token create {{ kubeadm_token }} + changed_when: false when: - inventory_hostname == groups['kube-master']|first - kubeadm_token is defined @@ -173,6 +174,7 @@ - name: Create kubeadm token for joining nodes with 24h expiration (default) command: "{{ bin_dir }}/kubeadm --kubeconfig /etc/kubernetes/admin.conf token create" + changed_when: false register: temp_token retries: 5 delay: 5 diff --git a/roles/kubernetes/master/tasks/kubeadm-version.yml b/roles/kubernetes/master/tasks/kubeadm-version.yml index 1ad14db6850f4bc1ea9861b4aab8ea8945083f56..8c7feea3510bd11fe5ad30b8aa98b039b76e98fe 100644 --- a/roles/kubernetes/master/tasks/kubeadm-version.yml +++ b/roles/kubernetes/master/tasks/kubeadm-version.yml @@ -1,9 +1,10 @@ --- -- name: gets the kubeadm version +- name: Get the kubeadm version command: "{{ bin_dir }}/kubeadm version -o short" register: kubeadm_output + changed_when: false -- name: sets kubeadm api version to v1beta2 +- name: Set kubeadm api version to v1beta2 set_fact: kubeadmConfig_api_version: v1beta2 diff --git a/roles/kubernetes/node/tasks/kubelet.yml b/roles/kubernetes/node/tasks/kubelet.yml index e72e5e08398bf554cbda1a3b9518c6eec50d2ccd..cb95cc174a82cd3740214a11aa1a28345cb7b6d5 100644 --- a/roles/kubernetes/node/tasks/kubelet.yml +++ b/roles/kubernetes/node/tasks/kubelet.yml @@ -6,11 +6,12 @@ state: directory when: dynamic_kubelet_configuration -- name: gets the kubeadm version +- name: Get the kubeadm version command: "{{ bin_dir }}/kubeadm version -o short" register: kubeadm_output + changed_when: false -- name: sets kubelet api version to v1beta1 +- name: Set kubelet api version to v1beta1 set_fact: kubeletConfig_api_version: v1beta1 tags: diff --git a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml index 25e36b09f0fcef721d8750f4b8c813d7830e4f7f..0a4cd9ef3a582f0821e594c54fd777bc7df2eac8 100644 --- a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml +++ b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml @@ -18,6 +18,7 @@ state: present check_mode: yes register: os_variant_coreos + changed_when: false - name: set is_fedora_coreos set_fact: