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

Commit

Permalink
check systemd version (#1020)
Browse files Browse the repository at this point in the history
* check systemd version

* Update roles/check_system_static/tasks/main.yml
  • Loading branch information
liubo0127 authored and ericsyh committed Dec 4, 2019
1 parent 5002769 commit 6e65334
Showing 1 changed file with 19 additions and 0 deletions.
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

0 comments on commit 6e65334

Please sign in to comment.