Skip to content

Commit 1bcc46f

Browse files
authored
Add SLES tests (#536)
1 parent 19069ce commit 1bcc46f

File tree

23 files changed

+297
-174
lines changed

23 files changed

+297
-174
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ BUG FIXES:
2424

2525
TESTS:
2626

27+
* Add SLES 15 to all Molecule tests.
2728
* Create downgrade and upgrade tests for NGINX Plus.
2829
* Remove Yamllint (Ansible Lint now incorporates Yamllint).
2930
* Skip Ansible Lint line length rule.

molecule/common/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ RUN \
3030
&& yum clean all; \
3131
elif [ $(command -v zypper) ]; then \
3232
zypper refresh \
33-
&& zypper install -y bash iproute2 python3 sudo vim \
33+
&& zypper install -y bash iproute2 python3 sudo systemd systemd-sysvinit vim \
3434
&& zypper clean -a; \
3535
elif [ $(command -v apk) ]; then \
3636
apk update \

molecule/default/converge.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
ansible.builtin.set_fact:
1515
version: -1.21.6-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
1616
when: ansible_facts['os_family'] == "RedHat"
17+
- name: Set repo if SLES
18+
ansible.builtin.set_fact:
19+
version: =1.21.6-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
20+
when: ansible_facts['os_family'] == "Suse"
1721
tasks:
1822
- name: Install NGINX
1923
ansible.builtin.include_role:

molecule/default/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ platforms:
103103
volumes:
104104
- /sys/fs/cgroup:/sys/fs/cgroup:rw
105105
command: /sbin/init
106+
- name: sles15
107+
image: registry.suse.com/bci/bci-base:15.4
108+
dockerfile: ../common/Dockerfile.j2
109+
privileged: true
110+
volumes:
111+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
112+
command: /usr/sbin/init
106113
provisioner:
107114
name: ansible
108115
playbooks:

molecule/downgrade/converge.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
ansible.builtin.set_fact:
1515
version: -1.21.6-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
1616
when: ansible_facts['os_family'] == "RedHat"
17+
- name: Set repo if SLES
18+
ansible.builtin.set_fact:
19+
version: =1.21.6-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
20+
when: ansible_facts['os_family'] == "Suse"
1721
tasks:
1822
- name: Install NGINX
1923
ansible.builtin.include_role:

molecule/downgrade/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ platforms:
103103
volumes:
104104
- /sys/fs/cgroup:/sys/fs/cgroup:rw
105105
command: /sbin/init
106+
- name: sles15
107+
image: registry.suse.com/bci/bci-base:15.4
108+
dockerfile: ../common/Dockerfile.j2
109+
privileged: true
110+
volumes:
111+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
112+
command: /usr/sbin/init
106113
provisioner:
107114
name: ansible
108115
playbooks:

molecule/downgrade_plus/converge.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
ansible.builtin.set_fact:
1515
version: -26-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
1616
when: ansible_facts['os_family'] == "RedHat"
17+
- name: Set repo if SLES
18+
ansible.builtin.set_fact:
19+
version: =26-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
20+
when: ansible_facts['os_family'] == "Suse"
1721
tasks:
1822
- name: Install NGINX
1923
ansible.builtin.include_role:

molecule/downgrade_plus/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ platforms: # Alpine 3.16 only has one version of NGINX Plus available (at the mo
9696
volumes:
9797
- /sys/fs/cgroup:/sys/fs/cgroup:rw
9898
command: /sbin/init
99+
- name: sles15
100+
image: registry.suse.com/bci/bci-base:15.4
101+
dockerfile: ../common/Dockerfile.j2
102+
privileged: true
103+
volumes:
104+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
105+
command: /usr/sbin/init
99106
provisioner:
100107
name: ansible
101108
playbooks:

molecule/module/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ platforms:
103103
volumes:
104104
- /sys/fs/cgroup:/sys/fs/cgroup:rw
105105
command: /sbin/init
106+
- name: sles15
107+
image: registry.suse.com/bci/bci-base:15.4
108+
dockerfile: ../common/Dockerfile.j2
109+
privileged: true
110+
volumes:
111+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
112+
command: /usr/sbin/init
106113
provisioner:
107114
name: ansible
108115
playbooks:

molecule/plus/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ platforms:
103103
volumes:
104104
- /sys/fs/cgroup:/sys/fs/cgroup:rw
105105
command: /sbin/init
106+
- name: sles15
107+
image: registry.suse.com/bci/bci-base:15.4
108+
dockerfile: ../common/Dockerfile.j2
109+
privileged: true
110+
volumes:
111+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
112+
command: /usr/sbin/init
106113
provisioner:
107114
name: ansible
108115
playbooks:

0 commit comments

Comments
 (0)