Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

check systemd version #1020

Merged
merged 2 commits into from
Dec 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions roles/check_system_static/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@
- ansible_distribution in ['CentOS', 'RedHat']
- ansible_distribution_major_version != '7'

- name: Get systemd info
yum:
list: systemd
register: systemd_info
when: ansible_os_family == 'RedHat'

- set_fact:
systemd_version: "{{ systemd_info.results | json_query(query) }}"
vars:
query: "[?yumstate=='installed'].release"
when: ansible_os_family == 'RedHat'

- name: Preflight check - Systemd version
fail:
msg: "Current systemd release is {{ systemd_version }} (below 52.el7), there are some memory bugs. Refer to https://access.redhat.com/discussions/3536621"
when:
- ansible_os_family == 'RedHat'
- systemd_version[0] < '52.el7'

- name: Deploy epollexclusive script
copy: src="{{ script_dir }}/check/epollexclusive" dest="{{ deploy_dir }}/epollexclusive" mode=0755

Expand Down