Debian Codegraph @

test/integration/targets/service_facts/tasks/main.yml

raw
1 # Test playbook for the service_facts module
2 # Copyright: (c) 2017, Adam Miller <[email protected]>
3 # Copyright: (c) 2020, Abhijeet Kasurde <[email protected]>
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 - name: Gather service facts
7 service_facts:
8
9 - name: check for ansible_facts.services exists
10 assert:
11 that: ansible_facts.services is defined
12
13 - name: Test disabled service facts (https://github.com/ansible/ansible/issues/69144)
14 block:
15 - name: display value of ansible_service_mgr
16 debug:
17 msg: 'ansible_service_mgr: {{ ansible_service_mgr }}'
18
19 - name: setup test service script
20 include_tasks: 'systemd_setup.yml'
21
22 - name: execute tests
23 import_tasks: tests.yml
24
25 when:
26 - ansible_service_mgr == "systemd"
27 - ansible_distribution != 'Alpine'