-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
233 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
--- | ||
- name: remove version hold for kubeadm packages | ||
command: apt-mark unhold kubeadm | ||
- name: Gather the package facts | ||
package_facts: | ||
manager: auto | ||
strategy: first | ||
|
||
- name: install kubeadm remote deb package | ||
shell: | | ||
apt-get install --force-yes --yes \ | ||
kubeadm={{ package_versions.kubernetes_deb }} | ||
args: | ||
warn: false | ||
register: result | ||
until: result is success | ||
retries: 3 | ||
delay: 3 | ||
- name: remove lock install and lock kubeadm package | ||
block: | ||
- name: remove version hold for kubeadm packages | ||
command: apt-mark unhold kubeadm | ||
|
||
- name: add version hold for kubeadm packages | ||
command: apt-mark hold kubeadm | ||
- name: install kubeadm remote deb package | ||
shell: | | ||
apt-get install --force-yes --yes \ | ||
kubeadm={{ package_versions.kubernetes_deb }} | ||
args: | ||
warn: false | ||
register: result | ||
until: result is success | ||
retries: 3 | ||
delay: 3 | ||
|
||
- name: add version hold for kubeadm packages | ||
command: apt-mark hold kubeadm | ||
when: "'kubeadm' not in ansible_facts.packages or | ||
('kubeadm' in ansible_facts.packages and | ||
kubernetes_version not in | ||
ansible_facts.packages['kubelet'][0]['version'])" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,48 @@ | ||
--- | ||
- name: remove versionlock for kubeadm packages | ||
command: yum versionlock delete kubeadm | ||
args: | ||
warn: false | ||
ignore_errors: true | ||
register: command_result | ||
changed_when: | | ||
'command_result.stdout is regex(".*versionlock deleted: [1-9]+.*")' | ||
when: | ||
- versionlock_plugin_enabled | ||
- "( | ||
'kubeadm' in exportedversionlocklist.stdout and | ||
not 'kubeadm-' + package_versions.kubernetes_rpm in exportedversionlocklist.stdout | ||
)" | ||
- name: Gather the package facts | ||
package_facts: | ||
manager: auto | ||
strategy: first | ||
|
||
- name: install kubeadm rpm package | ||
yum: | ||
name: "{{ 'kubeadm-' + package_versions.kubernetes_rpm }}" | ||
state: present | ||
update_cache: true | ||
enablerepo: "{{ 'offline' if offline_mode_enabled else '' }}" | ||
disablerepo: "{{ '*' if offline_mode_enabled else '' }}" | ||
register: result | ||
until: result is success | ||
retries: 3 | ||
delay: 3 | ||
- name: remove lock install and lock kubeadm package | ||
block: | ||
- name: remove versionlock for kubeadm packages | ||
command: yum versionlock delete kubeadm | ||
args: | ||
warn: false | ||
ignore_errors: true | ||
register: command_result | ||
changed_when: | | ||
'command_result.stdout is regex(".*versionlock deleted: [1-9]+.*")' | ||
when: | ||
- versionlock_plugin_enabled | ||
- "( | ||
'kubeadm' in exportedversionlocklist.stdout and | ||
not 'kubeadm-' + package_versions.kubernetes_rpm in exportedversionlocklist.stdout | ||
)" | ||
|
||
- name: add versionlock for kubeadm package | ||
command: yum versionlock add kubeadm | ||
args: | ||
warn: false | ||
register: command_result | ||
changed_when: | | ||
'command_result.stdout is regex(".*versionlock added: [1-9]+.*")' | ||
when: | ||
- versionlock_plugin_enabled | ||
- name: install kubeadm rpm package | ||
yum: | ||
name: "{{ 'kubeadm-' + package_versions.kubernetes_rpm }}" | ||
state: present | ||
update_cache: true | ||
enablerepo: "{{ 'offline' if offline_mode_enabled else '' }}" | ||
disablerepo: "{{ '*' if offline_mode_enabled else '' }}" | ||
register: result | ||
until: result is success | ||
retries: 3 | ||
delay: 3 | ||
|
||
- name: add versionlock for kubeadm package | ||
command: yum versionlock add kubeadm | ||
args: | ||
warn: false | ||
register: command_result | ||
changed_when: | | ||
'command_result.stdout is regex(".*versionlock added: [1-9]+.*")' | ||
when: | ||
- versionlock_plugin_enabled | ||
when: "'kubeadm' not in ansible_facts.packages or | ||
('kubeadm' in ansible_facts.packages and | ||
kubernetes_version not in | ||
ansible_facts.packages['kubelet'][0]['version'])" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.