-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsagenv-common-webmethods-check-service-running.yaml
71 lines (66 loc) · 3.41 KB
/
sagenv-common-webmethods-check-service-running.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
### Check_Service_Running: Enforce that the service is started, and that the ports are accessible from command central server
### minimum params:
### cce_provisioning_inventory_hosts_pattern (type: string - the target ansible group to install the CCE template)
### cce_provisioning_inventory_hosts_property (type: string - the property to lookup to find the actual network host of an alias)
### cce_provisioning_installed_product_names (type: list - the products installed by the template so we can create the right services etc...)
### cce_provisioning_installed_product_envs_by_name (type: dictionary)
### cce_provisioning_postinstall_service_setup (type: boolean)
### cce_provisioning_postinstall_reboot (type: boolean)
### cce_provisioning_validation_ports (type: list)
### cce_provisioning_validation_ports_timeout (type: number)
- import_playbook: sagenv-common-webmethods-load-vars.yaml
tags:
- always
- hosts: "{{ cce_provisioning_command_central_hosts | default('commandcentral') }}"
become: true
tasks:
- name: Print the params for the webMethods Check_Service_Running tasks
debug:
msg:
- "Common webMethods Check_Service_Running tasks with params:"
- "cce_provisioning_inventory_hosts_pattern = {{ cce_provisioning_inventory_hosts_pattern | default('undefined') }}"
- "cce_provisioning_inventory_hosts_property = {{ cce_provisioning_inventory_hosts_property | default('undefined') }}"
- "cce_provisioning_installed_product_names = {{ cce_provisioning_installed_product_names | default('undefined') }}"
- "cce_provisioning_installed_product_instance_names = {{ cce_provisioning_installed_product_instance_names | default('undefined') }}"
- "cce_provisioning_force_restart = {{ cce_provisioning_force_restart | default(false) }}"
- "cce_provisioning_validation_ports = {{ cce_provisioning_validation_ports | default('undefined') }}"
- "cce_provisioning_validation_ports_timeout = {{ cce_provisioning_validation_ports_timeout | default('undefined') }}"
tags:
- always
- hosts: "{{ cce_provisioning_inventory_hosts_pattern }}"
become: true
tasks:
- import_role:
name: service-webmethods
vars:
product_command: "stop"
product_name: "{{ cce_provisioning_installed_product_names }}"
product_instance_name: "{{ cce_provisioning_installed_product_instance_names }}"
force_create: false
service_user: "{{ webmethods_user }}"
when: cce_provisioning_force_restart | default(false) |bool
- import_role:
name: service-webmethods
vars:
product_command: "start"
product_name: "{{ cce_provisioning_installed_product_names }}"
product_instance_name: "{{ cce_provisioning_installed_product_instance_names }}"
force_create: false
service_user: "{{ webmethods_user }}"
tags:
- enforce_start
#check ports
- hosts: "{{ cce_provisioning_command_central_hosts | default('commandcentral') }}"
become: true
become_user: "{{ cce_owner }}"
tasks:
- import_role:
name: check-remote-ports
vars:
inventory_pattern: "{{ cce_provisioning_inventory_hosts_pattern }}"
inventory_hosts_property: "{{ cce_provisioning_inventory_hosts_property }}"
validation_ports: "{{ cce_provisioning_validation_ports }}"
validation_ports_timeout: "{{ cce_provisioning_validation_ports_timeout }}"
tags:
- check_running