-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
Add support for Noble
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
# defaults file | ||
--- | ||
pip_python_version_major: 2 | ||
pip_install_method: native | ||
# Only available for < 24.04 | ||
# pip_install_method: get-pip | ||
|
||
pip_python_version_major: 3 | ||
pip_python_version: "{{ pip_python_version_major }}" | ||
|
||
pip_install: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
--- | ||
collections: | ||
- name: community.docker | ||
version: '>=1.2.0,<2' | ||
- name: community.general | ||
version: '>=2,<3' | ||
collections: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# tasks file | ||
--- | ||
- name: install | get-pip | install dependencies | ||
Check warning on line 3 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 3 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 3 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 3 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 3 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
|
||
ansible.builtin.apt: | ||
name: "{{ pip_install_get_pip_dependencies }}" | ||
state: "{{ apt_install_state | default('latest') }}" | ||
update_cache: true | ||
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" | ||
tags: | ||
- pip-install-get-pip-dependencies | ||
|
||
- name: install | get-pip | create (download) directory | ||
Check warning on line 12 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 12 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 12 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 12 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 12 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
|
||
ansible.builtin.file: | ||
path: "{{ pip_install_get_pip_download_path }}" | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
tags: | ||
- pip-install-get-pip-directory | ||
|
||
- name: install | get-pip | get python version # noqa risky-shell-pipe | ||
Check warning on line 22 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 22 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 22 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 22 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 22 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
|
||
ansible.builtin.shell: > | ||
python{{ pip_python_version_major | string }} --version 2>&1 | awk '{print $2}' | ||
register: _python_version | ||
changed_when: false | ||
tags: | ||
- pip-install-get-pip-get-python-version | ||
|
||
- name: install | get-pip | get download url | ||
Check warning on line 30 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 30 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 30 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 30 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 30 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
|
||
tags: | ||
- pip-install-get-pip-get-download-url | ||
block: | ||
- name: install | get-pip | get download url (2.6) | ||
Check warning on line 34 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 34 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 34 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 34 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 34 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
|
||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/2.6/get-pip.py' | ||
when: | ||
- _python_version.stdout is version('2.6', '>=') | ||
- _python_version.stdout is version('2.7', '<') | ||
|
||
- name: install | get-pip | get download url (2.7) | ||
Check warning on line 41 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 41 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 41 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 41 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 41 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
|
||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/2.7/get-pip.py' | ||
when: | ||
- _python_version.stdout is version('2.7', '>=') | ||
- _python_version.stdout is version('2.8', '<') | ||
|
||
- name: install | get-pip | get download url (3.2) | ||
Check warning on line 48 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 48 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 48 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 48 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 48 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
|
||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/3.2/get-pip.py' | ||
when: | ||
- _python_version.stdout is version('3.2', '>=') | ||
- _python_version.stdout is version('3.3', '<') | ||
|
||
- name: install | get-pip | get download url (3.3) | ||
Check warning on line 55 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 55 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 55 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 55 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
Check warning on line 55 in tasks/install-get-pip.yml GitHub Actions / Lintname[casing]
|
||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/3.3/get-pip.py' | ||
when: | ||
- _python_version.stdout is version('3.3', '>=') | ||
- _python_version.stdout is version('3.4', '<') | ||
|
||
- name: install | get-pip | get download url (3.4) | ||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/3.4/get-pip.py' | ||
when: | ||
- _python_version.stdout is version('3.4', '>=') | ||
- _python_version.stdout is version('3.5', '<') | ||
|
||
- name: install | get-pip | get download url (3.5) | ||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/3.5/get-pip.py' | ||
when: | ||
- _python_version.stdout is version('3.5', '>=') | ||
- _python_version.stdout is version('3.6', '<') | ||
|
||
- name: install | get-pip | get download url (3.6) | ||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/3.6/get-pip.py' | ||
when: | ||
- _python_version.stdout is version('3.6', '>=') | ||
- _python_version.stdout is version('3.7', '<') | ||
|
||
- name: install | get-pip | get download url (3.7) | ||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/3.7/get-pip.py' | ||
when: | ||
- _python_version.stdout is version('3.7', '>=') | ||
- _python_version.stdout is version('3.8', '<') | ||
|
||
- name: install | get-pip | get download url (latest) | ||
ansible.builtin.set_fact: | ||
pip_download_url: 'https://bootstrap.pypa.io/pip/get-pip.py' | ||
when: _python_version.stdout is version('3.8', '>=') | ||
|
||
- name: install | get-pip | download (latest) | ||
ansible.builtin.get_url: | ||
url: "{{ pip_download_url }}" | ||
dest: "{{ pip_install_get_pip_download_path }}/{{ pip_download_url | basename }}-{{ pip_python_version_major | string }}" | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
force: true | ||
register: _download_latest | ||
tags: | ||
- pip-install-get-pip-download | ||
|
||
- name: install | get-pip | install (latest) | ||
ansible.builtin.command: > | ||
python{{ pip_python_version_major | string }} {{ _download_latest.dest }} | ||
when: _download_latest is changed | ||
changed_when: true | ||
tags: | ||
- pip-install-get-pip-install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# tasks file | ||
--- | ||
- name: install | native | dependencies | ||
ansible.builtin.apt: | ||
name: "{{ pip_install_native_dependencies }}" | ||
state: "{{ apt_install_state | default('latest') }}" | ||
update_cache: true | ||
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" | ||
tags: | ||
- pip-install-native-dependencies |