Commit ce8aa094035ac813e345e08b47e171fb957bd213

Authored by Alexandre Chapellon
1 parent d4d914bbd0
Exists in master

switch selenium node tasks to handlers

... ... @@ -24,7 +24,6 @@ tests_desktopsync_path: { repo: snapshots, path: /org/alfresco/alfresco-benchmar
24 24  
25 25 # Should we remove existing war files
26 26 #tomcat_cln: False
27   -tomcat_cln: True
28 27  
29 28 # Selenium version MUST be X.Y.Z
30 29 #selenium_ver: 3.3.1
... ...
yml/roles/selenium/handlers/main.yml
... ... @@ -20,3 +20,12 @@
20 20 state: started
21 21 enabled: yes
22 22  
  23 +- name: Enable Selenium service
  24 + service:
  25 + name: "{{ item }}"
  26 + enabled: yes
  27 + with_items:
  28 + - selenium-hub
  29 + - selenium-node
  30 + when: ( inventory_hostname in groups['selenium-hub'] and item == 'selenium-hub' ) or ( inventory_hostname in groups['load-driver'] and item == 'selenium-node' )
  31 +
... ...
yml/roles/selenium/tasks/selenium.yml
... ... @@ -44,17 +44,8 @@
44 44 src: unit-file_node
45 45 dest: "{{ systemd_unit_prefix }}/systemd/system/selenium-node.service"
46 46 mode: 0644
47   - when: inventory_hostname in groups['selenium-hub'] and ansible_service_mgr == 'systemd'
  47 + when: inventory_hostname in groups['load-driver'] and ansible_service_mgr == 'systemd'
48 48 notify:
49 49 - Reload Systemd
50 50 - Restart Selenium node
51 51  
52   -- name: Enable Selenium service
53   - service:
54   - name: "{{ item }}"
55   - enabled: yes
56   - with_items:
57   - - selenium-hub
58   - - selenium-node
59   - when: ( inventory_hostname in groups['selenium-hub'] and item == 'selenium-hub' ) or ( inventory_hostname in groups['load-driver'] and item == 'selenium-node' )
60   -
... ...