Skip to content

Commit af2907f

Browse files
committed
Test zammad role on AlmaLinux9
Signed-off-by: Norman Ziegner <n.ziegner@hzdr.de>
1 parent f6ff07f commit af2907f

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

.github/workflows/zammad.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
fail-fast: false
4343
matrix:
4444
image:
45+
- "ghcr.io/hifis-net/almalinux-systemd:9"
4546
- "ghcr.io/hifis-net/ubuntu-systemd:22.04"
4647
- "ghcr.io/hifis-net/ubuntu-systemd:24.04"
4748

molecule/zammad/prepare.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
vars:
1111
# Apply suggested Elasticsearch configuration
1212
elasticsearch_version: "8.x"
13-
elasticsearch_package: "elasticsearch=8.8.1"
13+
elasticsearch_package: "elasticsearch"
1414
elasticsearch_heap_size_min: "256m"
1515
elasticsearch_heap_size_max: "256m"
1616
elasticsearch_extra_options: |
@@ -23,6 +23,7 @@
2323
tasks:
2424

2525
- name: "Install required packages"
26+
when: "ansible_facts.os_family == 'Debian'"
2627
ansible.builtin.apt:
2728
name:
2829
- "sudo"
@@ -34,6 +35,37 @@
3435
state: "present"
3536
update_cache: true
3637

38+
- name: "Provide SSL/TLS certificate on AlmaLinux"
39+
when: "ansible_facts.os_family == 'RedHat'"
40+
block:
41+
- name: "Ensure SSL/TLS directories exist"
42+
ansible.builtin.file:
43+
path: "{{ item }}"
44+
state: "directory"
45+
mode: '0755'
46+
loop:
47+
- "/etc/ssl/private"
48+
- "/etc/ssl/certs"
49+
50+
- name: "Install python-cryptography"
51+
ansible.builtin.pip:
52+
name: "cryptography"
53+
54+
- name: "Create RSA private key"
55+
community.crypto.openssl_privatekey:
56+
path: "/etc/ssl/private/ssl-cert-snakeoil.key"
57+
size: 2048
58+
type: "RSA"
59+
mode: '0600'
60+
61+
- name: "Create a snakeoil certificate"
62+
community.crypto.x509_certificate:
63+
path: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
64+
privatekey_path: "/etc/ssl/private/ssl-cert-snakeoil.key"
65+
provider: "selfsigned"
66+
selfsigned_not_after: "+365d"
67+
mode: '0644'
68+
3769
- name: "Include geerlingguy.elasticsearch"
3870
ansible.builtin.include_role:
3971
name: "geerlingguy.elasticsearch"

roles/zammad/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ File path to the SSL/TLS certificate which is used for HTTPS.
6464
zammad_ssl_key_path: "/etc/ssl/private/zammad_key.pem"
6565
```
6666
67-
File path to the SSL/TLS private key which is used for HTTPS.
67+
File path to the SSL/TLS private key which is used for HTTPS.
6868
6969
```yaml
7070
zammad_ssl_cert:

roles/zammad/tasks/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
ansible.builtin.package:
8080
name: "zammad={{ zammad_version }}*"
8181
state: "present"
82-
force: true
82+
allow_downgrade: true
8383
notify:
8484
- "Set Elasticsearch server address"
8585
- "Build search index"

0 commit comments

Comments
 (0)