Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/launchd/tasks/teardown.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 - name: "[{{ item }}] Unload service"
7 launchd:
8 name: "{{ launchd_service_name }}"
9 state: unloaded
10 become: true
11 register: launchd_unloaded_result
12
13 - name: "[{{ item }}] Validation"
14 assert:
15 that:
16 - launchd_unloaded_result is success
17 - launchd_unloaded_result.status.current_state == 'unloaded'
18 - launchd_unloaded_result.status.current_pid == '-'
19
20 - name: "[{{ item }}] Remove test service configuration"
21 file:
22 path: "{{ launchd_plist_location }}"
23 state: absent
24 become: true
25
26 - name: "[{{ item }}] Remove test service server"
27 file:
28 path: "/usr/local/sbin/ansible_test_service"
29 state: absent
30 become: true