forked from edureka-devops/projCert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselenium-dependencies.yml
29 lines (29 loc) · 1.04 KB
/
selenium-dependencies.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
---
- hosts: TestWebServers
become: yes
become_user: root
tasks:
- name: Check if chromedriver exists
stat:
path: ./chromedriver
register: isChromeDriverPresent
- debug:
msg: "Chromedriver exists, so we skip the chromedriver installation..."
when: isChromeDriverPresent.stat.exists
- name: Install ChromeDriver
shell: |
apt-get update
apt-get install -y unzip xvfb libxi6 libgconf-2-4
curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
apt-get -y update
apt-get -y install google-chrome-stable
wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
chmod -R 777 chromedriver
when: not isChromeDriverPresent.stat.exists
- name: Install Chromium Browser
package:
name: chromium-browser
state: present
when: not isChromeDriverPresent.stat.exists