Skip to content

Commit 7dc3746

Browse files
authored
Upgrade repo for Ubuntu 22.04. (#190)
* Upgrade repo for Ubuntu 22.04. * Remove unnecessary Dockerfile from Molecule configuration. * Add python3-distutils package required by Ubuntu 22.04. * Use postgresql_privs module to set database user permissions. * Update linting. * Remove ntp from base packages installed as it is no longer necessary.
1 parent 298b526 commit 7dc3746

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+278
-233
lines changed

.ansible-lint

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
---
2+
13
skip_list:
24
- ANSIBLE0006
35
- ANSIBLE0012
6+
# TODO: Remove free-form from the repo.
7+
- no-free-form
8+
- name[missing]
9+
# TODO: Fix this.
10+
- name[casing]
11+
# TODO: Test removing this from each task and see if there is a workaround.
12+
- no-changed-when

.github/workflows/molecule.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
strategy:
88
max-parallel: 4
99
matrix:
10-
python-version: [3.6, 3.7]
10+
python-version: [3.9, "3.10", 3.11]
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1616
with:
1717
python-version: ${{ matrix.python-version }}
1818
- name: Install dependencies

.yamllint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
13
extends: default
24

35
rules:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Environment-specific settings are in the `group_vars` directory.
2323
A `certbot` role is also included for automatically generating and renewing
2424
trusted SSL certificates with [Let's Encrypt][lets-encrypt].
2525

26-
**Tested with OS:** Ubuntu 18.04 LTS (64-bit), Ubuntu 16.04 LTS (64-bit).
26+
**Tested with OS:** Ubuntu 22.04 LTS (64-bit), Ubuntu 20.04 LTS (64-bit).
2727

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

@@ -313,9 +313,9 @@ to run during deployment in most Django environments.
313313

314314
### Changing the Ubuntu release
315315

316-
The [Vagrantfile](Vagrantfile) uses the Ubuntu 20.04 LTS Vagrant box for a
316+
The [Vagrantfile](Vagrantfile) uses the Ubuntu 22.04 LTS Vagrant box for a
317317
64-bit PC that is published by Canonical in HashiCorp Atlas. To use Ubuntu
318-
18.04 LTS instead, change the `config.vm.box` setting to `ubuntu/bionic64`.
318+
20.04 LTS instead, change the `config.vm.box` setting to `ubuntu/focal64`.
319319

320320
### Changing the Python version used by your application
321321

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
VAGRANTFILE_API_VERSION = "2"
66

77
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8-
config.vm.box = "ubuntu/focal64"
8+
config.vm.box = "ubuntu/jammy64"
99
config.ssh.forward_agent = false
1010
config.vm.define "my-cool-app.local", primary: true do |app|
1111
app.vm.hostname = "my-cool-app"

dbservers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
update_apt_cache: true
1010

1111
module_defaults:
12-
apt:
12+
ansible.builtin.apt:
1313
force_apt_get: true
1414

1515
roles:

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use the official Ubuntu 20.04 base image from the Docker repository
2-
FROM ubuntu:focal
2+
FROM ubuntu:jammy
33

44
# Allow processes to detect that they are being run in a container
55
ENV container oci

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.9
14+
virtualenv_python_version: python3.11
1515

1616

1717
# Git settings.

molecule/default/Dockerfile.j2

Lines changed: 0 additions & 14 deletions
This file was deleted.

molecule/default/converge.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
# See https://github.com/metacloud/molecule/issues/843#issuecomment-304710797
33
# and https://github.com/metacloud/molecule/blob/v2/test/scenarios/driver/ec2/molecule/default/playbook.yml#L1-L13
4-
- hosts: all
4+
- name: Converge
5+
hosts: all
56
gather_facts: false
67
tasks:
78
- name: Install Python3 for Ansible
8-
raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-minimal)
9+
ansible.builtin.raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-minimal)
910
become: true
1011
changed_when: false
1112

@@ -17,11 +18,11 @@
1718

1819
tasks:
1920
- name: Install Python3
20-
raw: apt-get install python3-minimal
21+
ansible.builtin.raw: apt-get install python3-minimal
2122
changed_when: false
2223

2324
module_defaults:
24-
apt:
25+
ansible.builtin.apt:
2526
force_apt_get: true
2627

2728
roles:

0 commit comments

Comments
 (0)