You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/service_facts/tasks/main.yml

26 lines
1.1 KiB
YAML

# Test playbook for the service_facts module
# Copyright: (c) 2017, Adam Miller <admiller@redhat.com>
# Copyright: (c) 2020, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- name: Gather service facts
service_facts:
- name: check for ansible_facts.services exists
assert:
that: ansible_facts.services is defined
- name: Test disabled service facts (https://github.com/ansible/ansible/issues/69144)
block:
- name: display value of ansible_service_mgr
debug:
msg: 'ansible_service_mgr: {{ ansible_service_mgr }}'
- name: setup test service script
include_tasks: 'systemd_setup.yml'
- name: execute tests
import_tasks: tests.yml
when: (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and ansible_distribution_major_version is version('7', '>=')) or ansible_distribution == 'Fedora' or (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('15.04', '>=')) or (ansible_distribution == 'Debian' and ansible_distribution_version is version('8', '>=')) or ansible_os_family == 'Suse'