This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cherry-pick] fix installation compatibility of ubuntu 20.04 (#5257)
- Loading branch information
Showing
13 changed files
with
80 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- hosts: all,localhost | ||
gather_facts: false | ||
roles: | ||
- { role: set-python3 } | ||
|
||
- hosts: all | ||
become: true | ||
become_user: root | ||
roles: | ||
- { role: pre-installation } |
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# If sshpass is not installed on target machine, | ||
# kubespray 2.11 may have these issues: | ||
# https://github.com/kubernetes-sigs/kubespray/issues/6906 | ||
# https://github.com/kubernetes-sigs/kubespray/issues/5693 | ||
# This is resolved in PR https://github.com/kubernetes-sigs/kubespray/pull/6907 | ||
- name: "Install sshpass" | ||
apt: | ||
name: sshpass | ||
state: present | ||
|
||
|
||
# workaround for ubuntu 20.04 | ||
# This is resolved in https://github.com/kubernetes-sigs/kubespray/pull/6157 | ||
- name: "Install Python" | ||
apt: | ||
name: python | ||
state: present | ||
when: | ||
- ansible_distribution_version is version('20.04', '=') | ||
|
Empty file.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
# Ubuntu 20.04 doesn't have python2 pre-installed, | ||
# but Ubuntu 16.04, 18.04, and 20.04 all have python3 pre-installed. | ||
# So we use python3 as the default interpreter. | ||
# Also, we use `sudo python3` to execute python on dev box machine. | ||
# It is better to align with it here to prevent `ansible-playbook` from failing into another python. | ||
- name: set ansible_python_interpreter to python3 | ||
set_fact: | ||
ansible_python_interpreter: "/usr/bin/python3" | ||
|
||
- name: output ansible_python_interpreter | ||
debug: | ||
var: ansible_python_interpreter |
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
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