ansible/test/integration/targets/service_facts/tasks/main.yml
Matt Martz 7c60dadb9a
Updates to Integration tests to pass against Alpine (#70946)
* Start of alpine testing

* More updates

* Add forgotten file

* remove debug

* Add alpine3

* equal

* group 4

* group 4

* group 5

* Try to decrease test length

* libuser only available in testing

* Remove debug

* Make loops target work on hosts without gnu date

* Enable alpine testing

* ci_complete

* Don't specify uid for creating test user

* ci_complete

* Re-sort docker completion

* use newer container image

* ci_complete

* fix indentation

Co-authored-by: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
2020-08-07 14:28:10 -05:00

29 lines
1.2 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: skip broken distros
meta: end_host
when: ansible_distribution == 'Alpine'
- 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'