-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#187411386] Install Python3.12 in virtualenv and use it
- Loading branch information
1 parent
1fbca89
commit 45c1c8c
Showing
4 changed files
with
60 additions
and
20 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 |
---|---|---|
|
@@ -4,5 +4,3 @@ | |
|
||
_ansible: | ||
ansible_version: "" | ||
jinja2_version: "" | ||
markupsafe_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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
become: true | ||
|
||
pre_tasks: | ||
- name: Update APT Cache | ||
ansible.builtin.apt: | ||
update_cache: true | ||
cache_valid_time: 600 | ||
register: result | ||
until: result is succeeded | ||
when: ansible_os_family == 'Debian' | ||
|
||
- name: Add Deadsnakes APT repository | ||
ansible.builtin.apt_repository: | ||
repo: ppa:deadsnakes/ppa | ||
|
||
- name: Install python3.12 via APT | ||
ansible.builtin.apt: | ||
state: present | ||
update_cache: true | ||
name: | ||
- python3.12 | ||
- python3.12-dev | ||
- python3.12-venv | ||
|
||
- name: Install python3-pip via APT | ||
ansible.builtin.apt: | ||
state: present | ||
name: python3-pip | ||
|
||
tasks: | ||
- name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" | ||
ansible.builtin.include_role: | ||
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" |
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,25 +1,11 @@ | ||
--- | ||
# | ||
# tasks file for ansible-role-ansible | ||
# | ||
# vim:et:ts=2:ft=ansible | ||
|
||
- name: Install dependencies via APT | ||
ansible.builtin.apt: | ||
state: present | ||
name: | ||
- "{{ 'python-pip' if ansible_distribution_version in ['14.04', '18.04'] else 'python3-pip' }}" | ||
- "{{ 'python-dev' if ansible_distribution_version in ['14.04', '18.04'] else 'python3-dev' }}" | ||
- libffi-dev | ||
- libssl-dev | ||
|
||
- name: Install Ansible and dependencies via PIP | ||
ansible.builtin.pip: | ||
name: | ||
- "MarkupSafe{{ _ansible.markupsafe_version | default('') }}" | ||
- netaddr | ||
- boto | ||
- boto3 | ||
- botocore | ||
- passlib | ||
- "Jinja2{{ _ansible.jinja2_version | default('') }}" | ||
- "ansible-core{{ _ansible.ansible_version | default('') }}" | ||
virtualenv_command: /usr/bin/python3.12 -m venv /opt/ansible_virtualenv | ||
virtualenv: /opt/ansible_virtualenv |