Skip to content

Commit fe6ebaa

Browse files
committed
simplify cve_2023_41914_rpms
1 parent 3fd087e commit fe6ebaa

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

ansible/roles/cve-2023-41914/defaults/main.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22
# _cve_2023_41814_installed_slurm: []
33
cve_2023_41914_mysql_backup_path: "{{ mysql_datadir }}-backups/{{ lookup('pipe', 'date --iso-8601=seconds') }}.sql"
44

5-
# slurm-contribs-ohpc-22.05.10-2.1.ohpc.2.6.2.x86_64.rpm
65
cve_2023_41914_rpm_url: http://obs.openhpc.community:82/OpenHPC:/2.6.2:/Factory/EL_8/x86_64
76
cve_2023_41914_rpms: # see cve_2023_41914_rpm_url
8-
slurm-ohpc: ['22.05.10', 2.1.ohpc.2.6.2] # has to be first as dependency
9-
slurm-contribs-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
10-
slurm-devel-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
11-
slurm-example-configs-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
12-
slurm-libpmi-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
13-
slurm-ohpc-slurmrestd: ['22.05.10', '2.1.ohpc.2.6.2']
14-
slurm-openlava-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
15-
slurm-pam_slurm-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
16-
slurm-perlapi-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
17-
slurm-slurmctld-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
18-
slurm-slurmd-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
19-
slurm-slurmdbd-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
20-
slurm-sview-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
21-
slurm-torque-ohpc: ['22.05.10', '2.1.ohpc.2.6.2']
7+
- slurm-ohpc # has to be first as dependency
8+
- slurm-contribs-ohpc
9+
- slurm-devel-ohpc
10+
- slurm-example-configs-ohpc
11+
- slurm-libpmi-ohpc
12+
- slurm-ohpc-slurmrestd
13+
- slurm-openlava-ohpc
14+
- slurm-pam_slurm-ohpc
15+
- slurm-perlapi-ohpc
16+
- slurm-slurmctld-ohpc
17+
- slurm-slurmd-ohpc
18+
- slurm-slurmdbd-ohpc
19+
- slurm-sview-ohpc
20+
- slurm-torque-ohpc
21+
cve_2023_41914_rpm_fix_ver: '22.05.10'
22+
cve_2023_41914_rpm_fix_release: '2.1.ohpc.2.6.2'
2223
_cve_2023_41814_updates: []
2324
cve_2023_41914_pkglist_path: "{{ appliances_environment_root }}/{{ inventory_hostname }}-cve_2023_41814_updates"

ansible/roles/cve-2023-41914/tasks/install-rpms.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
- name: Identify packages to update
22
set_fact:
3-
_cve_2023_41814_updates: "{{ _cve_2023_41814_updates + [item.key] }}"
4-
loop: "{{ cve_2023_41914_rpms | dict2items }}"
5-
loop_control:
6-
label: "{{ item.key }}"
3+
_cve_2023_41814_updates: "{{ _cve_2023_41814_updates + [item] }}"
4+
loop: "{{ cve_2023_41914_rpms }}"
75
when:
8-
- item.key in ansible_facts.packages
9-
- item.value[0] is version(ansible_facts.packages[item.key][0].version, '>')
6+
- item in ansible_facts.packages
7+
- cve_2023_41914_rpm_fix_ver is version(ansible_facts.packages[item][0].version, '>')
108

119
- name: Write packages to be modified to a file
1210
# allows recovery from failures in subsequent package deletion/rpm install
@@ -31,7 +29,7 @@
3129

3230
- name: Install rpms
3331
dnf:
34-
name: "{{ cve_2023_41914_rpm_url }}/{{ item }}-{{ cve_2023_41914_rpms[item] | join('-') }}.{{ ansible_architecture }}.rpm"
32+
name: "{{ cve_2023_41914_rpm_url }}/{{ item }}-{{ cve_2023_41914_rpm_fix_ver }}-{{ cve_2023_41914_rpm_fix_release }}.{{ ansible_architecture }}.rpm"
3533
loop: "{{ _cve_2023_41814_updates }}"
3634
register: _cve_2023_41814_rpm_installs
3735

0 commit comments

Comments
 (0)