Skip to content

Commit ca2bedc

Browse files
authored
Merge pull request #206 from YPCrumble/feature/upgrade-python
Upgrade Python to 3.12 and 3.13.
2 parents efacdc5 + 9f9dbab commit ca2bedc

File tree

6 files changed

+25
-34
lines changed

6 files changed

+25
-34
lines changed

.github/workflows/molecule.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
---
22
name: Molecule Test
33
on:
4-
push:
54
pull_request:
65
schedule:
76
- cron: '30 5 * * 0'
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
810
jobs:
911
build:
1012
runs-on: ubuntu-latest
1113
strategy:
14+
fail-fast: true
1215
max-parallel: 4
1316
matrix:
14-
python-version: ["3.10", 3.11]
17+
python-version: ["3.12", "3.13"]
1518

1619
steps:
17-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
1821
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
22+
uses: actions/setup-python@v5
2023
with:
2124
python-version: ${{ matrix.python-version }}
2225
cache: pip

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
ansible-django-stack
2-
====================
1+
# Ansible Django Stack
32

43
![Build Status](https://github.com/jcalazan/ansible-django-stack/actions/workflows/molecule.yml/badge.svg?branch=master)
54

5+
This is a complete Ansible playbook that will deploy a Django application to a
6+
server. It includes roles for setting up a PostgreSQL database, Nginx web
7+
server, Gunicorn application server, and Celery task queue.
8+
9+
## Requirements
10+
611
Ansible Playbook designed for environments running a Django app.
712
It can install and configure these applications that are commonly used in
813
production Django deployments:
@@ -26,6 +31,10 @@ trusted SSL certificates with [Let's Encrypt][lets-encrypt].
2631

2732
**Tested with Cloud Providers:** [Digital Ocean][digital-ocean], [AWS][aws], [Rackspace][rackspace]
2833

34+
## Python Requirements
35+
36+
This project requires **Python 3.12 or 3.13**. Earlier versions of Python are no longer supported.
37+
2938
## Getting Started
3039

3140
A quick way to get started is with Vagrant.
@@ -194,9 +203,6 @@ ansible-playbook --ssh-extra-args=-A -i production site.yml
194203
This is a little bit clunky but it does not restrict you from setting other
195204
SSH options if you need to.
196205

197-
198-
199-
200206
## Security
201207

202208
*NOTE: Do not run the Security role without understanding what it does.
@@ -318,14 +324,16 @@ The [Vagrantfile](Vagrantfile) uses the Ubuntu 22.04 LTS Vagrant box for a
318324

319325
### Changing the Python version used by your application
320326

321-
Python 3 is used by default in the `virtualenv`. To use Python 2 instead, just
322-
override the `virtualenv_python_version` variable and set it to `python`.
327+
This project supports Python 3.12 and 3.13. Python 3.12 is used by default in the `virtualenv`.
328+
To use Python 3.13 instead, override the `virtualenv_python_version` variable and set it to `python3.13`.
323329

324330
It is possible to install other versions of Python from an
325331
[unofficial PPA by Felix Krull (see disclaimer)][deadsnakes].
326332
To use this PPA, override the `enable_deadsnakes_ppa` variable and set it to
327333
`yes`. Then the `virtualenv_python_version` variable can be set to the name of
328-
a Python package from this PPA, such as `python3.6`.
334+
a Python package from this PPA, such as `python3.12` or `python3.13`.
335+
336+
**Note:** Only Python 3.12 and 3.13 are officially supported and tested.
329337

330338
### Changing the Python version used by Ansible
331339

group_vars/development/vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ application_name: django_default_project
1111
#
1212
# More info here: https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes
1313
enable_deadsnakes_ppa: true
14-
virtualenv_python_version: python3.11
14+
virtualenv_python_version: python3.12
1515

1616

1717
# Git settings.

group_vars/vagrant/vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ application_name: django_default_project
1111
#
1212
# More info here: https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes
1313
enable_deadsnakes_ppa: true
14-
virtualenv_python_version: python3.9
14+
virtualenv_python_version: python3.12
1515

1616

1717
# Git settings.

roles/rabbitmq/tasks/main.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
---
22

3-
- name: Add the RabbitMQ release signing key to the apt trusted keys
4-
ansible.builtin.apt_key: url=https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key
5-
state=present
6-
7-
- name: Add the RabbitMQ repository to the apt sources list
8-
ansible.builtin.apt_repository: repo='deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/deb/ubuntu {{ ansible_distribution_release }} main'
9-
update_cache={{ update_apt_cache }}
10-
state=present
11-
12-
- name: Add the RabbitMQ Erlang signing key to the apt trusted keys
13-
ansible.builtin.apt_key: url=https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
14-
state=present
15-
16-
- name: Add the RabbitMQ Erlang repository to the apt sources list
17-
ansible.builtin.apt_repository: repo='deb https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/deb/ubuntu {{ ansible_distribution_release }} main'
18-
update_cache={{ update_apt_cache }}
19-
state=present
20-
21-
223
- name: Install RabbitMQ server
234
ansible.builtin.apt:
245
update_cache: "{{ update_apt_cache }}"

roles/web/tasks/install_additional_packages.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@
1515
- gnutls-dev
1616
- libpq-dev
1717
- "{{ virtualenv_python_version + '-dev' }}"
18-
- "{{ virtualenv_python_version + '-distutils' }}" # Required by Ubuntu 22.04

0 commit comments

Comments
 (0)