forked from IBM/ansible-automation-for-lmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lmt_uninstall_scanner.yml
52 lines (48 loc) · 1.51 KB
/
lmt_uninstall_scanner.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
- hosts: localhost
connection: local
gather_facts: false
tasks:
- include_role:
name: ilmt_scanner
tasks_from: print_playbooks_version
- name: "Uninstall ILMT scanners"
hosts: all
strategy: free
gather_facts: true
gather_subset: "!all,!min"
tasks:
- name: "Uninstall ILMT scanners from WINDOWS endpoints"
become: true
become_user: system
become_method: runas
block:
- include_role:
name: ilmt_scanner
tasks_from: uninstall_scanner_windows
vars:
remove_computer_from_server: true
when: ansible_facts['os_family'] == 'Windows'
- name: "Uninstall ILMT scanners from UNIX/Linux endpoints"
become: true
block:
- include_role:
name: ilmt_scanner
tasks_from: uninstall_scanner_unix
vars:
remove_computer_from_server: true
when: ansible_facts['os_family'] != 'Windows' and ansible_facts['os_family'] != 'OS400'
- name: "Uninstall ILMT scanners from IBM i endpoints"
block:
- include_role:
name: ilmt_scanner
tasks_from: uninstall_scanner_ibmi
vars:
remove_computer_from_server: true
when: ansible_facts['os_family'] == 'OS400'
- name: "Decommission computer from ILMT server"
block:
- include_role:
name: ilmt_scanner
tasks_from: decommission_computer
when: endpoint_id_for_delete is defined and lmt_server_token is defined