File: test_systemd_version.yml

package info (click to toggle)
ansible-core 2.19.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 32,752 kB
  • sloc: python: 181,000; cs: 4,929; sh: 4,611; xml: 34; makefile: 21
file content (11 lines) | stat: -rw-r--r-- 353 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
---
- name: Show Gathered Facts
  ansible.builtin.debug:
    msg: "{{ ansible_systemd }}"

- name: Assert the systemd version fact
  ansible.builtin.assert:
    that:
      - ansible_systemd.version | int > 0
      - ansible_systemd.version is match('^[1-9][0-9][0-9]$')
      - ansible_systemd.features | regex_search('(\\+|-)(PAM|AUDIT)') is not none