Skip to content

Commit 9f99d3c

Browse files
authored
Merge pull request #56 from Oefenweb/add-install-method
Add install method
2 parents 88a8ea6 + d7740ad commit 9f99d3c

30 files changed

Lines changed: 192 additions & 147 deletions

.github/workflows/ci.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Check out the codebase
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v5
1919

2020
- name: Set up Python 3
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v6
2222
with:
23-
python-version: '3.x'
23+
python-version: '3 - 3.13'
2424

2525
- name: Install test dependencies
2626
run: |
@@ -44,28 +44,29 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
include:
47-
- distro: debian8
48-
- distro: debian9
49-
- distro: debian10
50-
- distro: ubuntu1604
51-
ansible-version: '>=2.10, <2.11'
52-
- distro: ubuntu1604
47+
- distro: debian11
48+
- distro: debian12
5349
- distro: ubuntu1804
50+
ansible-version: '>=9, <10'
5451
- distro: ubuntu2004
52+
ansible-version: '>=12, <13'
53+
- distro: ubuntu2204
54+
- distro: ubuntu2404
5555

5656
steps:
5757
- name: Check out the codebase
58-
uses: actions/checkout@v3
58+
uses: actions/checkout@v5
5959
with:
6060
path: "${{ github.repository }}"
6161

6262
- name: Set up Python 3
63-
uses: actions/setup-python@v4
63+
uses: actions/setup-python@v6
6464
with:
65-
python-version: '3.x'
65+
python-version: '3 - 3.13'
6666

6767
- name: Install test dependencies
68-
run: pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker
68+
run: |
69+
pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker
6970
7071
- name: Run Molecule tests
7172
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Check out the codebase
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v5
1616

1717
- name: Publish to Galaxy
1818
uses: robertdebock/galaxy-action@1.2.0

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ Set up the latest or a specific version of supervisor in Debian-like systems.
88
#### Requirements
99

1010
* `python` (will be installed)
11-
* `pip` (will not installed)
11+
* `pip` (will not be installed)
12+
13+
when using `supervisor_install_method: pip`
1214

1315
#### Variables
1416

15-
* `supervisor_python_version_major` [default: `2`]: Python version to install `supervisor` for.
16-
* `supervisor_python_version` [default: `supervisor_python_version`]: Deprecated
17+
* `supervisor_install_method`: [default: `native`]: The way to install supervisor (e.g. `native` (from Ubuntu repo) or `pip`)
18+
19+
* `supervisor_pip_python_version_major` [default: `3`]: Python version to install `supervisor` for. Only relevant when using `supervisor_install_method: pip`
20+
* `supervisor_pip_package_version` [default: `latest`]: Supervisor version to install (e.g. `latest`, `3.3.1`). Only relevant when using `supervisor_install_method: pip`
1721

18-
* `supervisor_version` [default: `latest`]: Supervisor version to install (e.g. `latest`, `3.3.1`)
1922
* `supervisor_unix_http_server_file` [default: `/var/run/supervisor.sock`]: A path to a UNIX domain socket (e.g. `/tmp/supervisord.sock`) on which supervisor will listen for HTTP/XML-RPC requests. `supervisorctl` uses XML-RPC to communicate with supervisord over this port
2023
* `supervisor_unix_http_server_chmod` [default: `'0700'`]: Change the UNIX permission mode bits of the UNIX domain socket to this value at startup
2124
* `supervisor_unix_http_server_chown` [optional]: The user and group of `supervisor_unix_http_server_file` file. Use the following format: `user:group`
@@ -25,7 +28,7 @@ Set up the latest or a specific version of supervisor in Debian-like systems.
2528
* `supervisor_system_user` [default: `root`]: Name of the user that should own the config file/directory
2629
* `supervisor_system_group` [default: `root`]: Name of the group that should own the config file/directory
2730

28-
* `supervisor_inet_http_server_enabled` [default: `false`]: Whether or not to enable the HTTP server
31+
* `supervisor_inet_http_server_enabled` [default: `false`]: Whether to enable the HTTP server
2932
* `supervisor_inet_http_server_port` [default: `9001`]: A TCP host:port value or (e.g. `127.0.0.1:9001`) on which supervisor will listen for HTTP/XML-RPC requests. `supervisorctl` will use XML-RPC to communicate with supervisord over this port
3033
* `supervisor_inet_http_server_username` [default: `admin`]: The username required for authentication to this HTTP server **Make sure to change!**
3134
* `supervisor_inet_http_server_password` [default: `'4ubA&Et=ASPe'`]: The password required for authentication to this HTTP server. This can be a cleartext password, or can be specified as a SHA-1 hash if prefixed by the string `{SHA}` **Make sure to change!**

Vagrantfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
role = File.basename(File.expand_path(File.dirname(__FILE__)))
55

66
boxes = [
7-
{
8-
:name => "ubuntu-1604",
9-
:box => "bento/ubuntu-16.04",
10-
:ip => '10.0.0.12',
11-
:cpu => "50",
12-
:ram => "256"
13-
},
147
{
158
:name => "ubuntu-1804",
169
:box => "bento/ubuntu-18.04",
@@ -23,28 +16,35 @@ boxes = [
2316
:box => "bento/ubuntu-20.04",
2417
:ip => '10.0.0.14',
2518
:cpu => "50",
26-
:ram => "384"
19+
:ram => "512"
2720
},
2821
{
29-
:name => "debian-8",
30-
:box => "bento/debian-8",
22+
:name => "ubuntu-2204",
23+
:box => "bento/ubuntu-22.04",
24+
:ip => '10.0.0.15',
25+
:cpu => "50",
26+
:ram => "768"
27+
},
28+
{
29+
:name => "ubuntu-2404",
30+
:box => "bento/ubuntu-24.04",
3131
:ip => '10.0.0.16',
3232
:cpu => "50",
33-
:ram => "256"
33+
:ram => "768"
3434
},
3535
{
36-
:name => "debian-9",
37-
:box => "bento/debian-9",
38-
:ip => '10.0.0.17',
36+
:name => "debian-11",
37+
:box => "bento/debian-11",
38+
:ip => '10.0.0.19',
3939
:cpu => "50",
4040
:ram => "256"
4141
},
4242
{
43-
:name => "debian-10",
44-
:box => "bento/debian-10",
45-
:ip => '10.0.0.18',
43+
:name => "debian-12",
44+
:box => "bento/debian-12",
45+
:ip => '10.0.0.20',
4646
:cpu => "50",
47-
:ram => "256"
47+
:ram => "384"
4848
},
4949
]
5050

defaults/main.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# defaults file
22
---
3-
supervisor_python_version_major: 2
4-
supervisor_python_version: "{{ supervisor_python_version_major }}"
3+
supervisor_install_method: native
54

6-
supervisor_dependencies:
7-
- "python{{ supervisor_python_version_major is version('3', '>=') | ternary('3', '') }}"
5+
supervisor_pip_python_version_major: 3
6+
supervisor_pip_package_version: latest
87

9-
supervisor_version: latest
108
supervisor_unix_http_server_file: /var/run/supervisor.sock
119
supervisor_unix_http_server_chmod: '0700'
1210

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
---
33
- name: restart supervisor
44
ansible.builtin.service:
5-
name: supervisor
5+
name: "{{ supervisor_package_name }}"
66
state: restarted
77
when: service_default_state | default('started') == 'started'

meta/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ galaxy_info:
1111
platforms:
1212
- name: Ubuntu
1313
versions:
14-
- xenial
1514
- bionic
1615
- focal
16+
- jammy
17+
- noble
1718
- name: Debian
1819
versions:
19-
- jessie
20-
- stretch
21-
- buster
20+
- bullseye
21+
- bookworm
2222
galaxy_tags:
2323
- web
2424
- system

molecule/default/collections.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
---
2-
collections:
3-
- name: community.docker
4-
version: '>=1.2.0,<2'
5-
- name: community.general
6-
version: '>=2,<3'
2+
collections: []

molecule/default/prepare.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
ansible.builtin.include_vars: "{{ playbook_dir }}/../../vars/main.yml"
1414
- name: include tasks
1515
ansible.builtin.import_tasks: "{{ playbook_dir }}/../../tests/tasks/pre.yml"
16+
when: supervisor_install_method == 'pip'

tasks/install-native.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# tasks file
2+
---
3+
- name: install | native | dependencies
4+
ansible.builtin.apt:
5+
name: "{{ supervisor_native_dependencies }}"
6+
state: "{{ apt_install_state | default('latest') }}"
7+
update_cache: true
8+
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}"
9+
tags:
10+
- supervisor-install-native-dependencies

0 commit comments

Comments
 (0)