Skip to content

Commit

Permalink
Add ability to configure installing firefox.
Browse files Browse the repository at this point in the history
  • Loading branch information
arknoll committed Dec 18, 2015
1 parent c300f78 commit 7fa6781
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# defaults file for selenium
selenium_install_dir: /opt
selenium_version: 2.46.0
selenium_install_firefox: true
17 changes: 14 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,31 @@
get_url: "url=http://selenium-release.storage.googleapis.com/{{ selenium_version | regex_replace('\\.[0-9]+$', '') }}/selenium-server-standalone-{{ selenium_version }}.jar dest=/opt/selenium/selenium-server-standalone-{{ selenium_version }}.jar"
tags: [configuration, selenium, selenium-download]

- name: Install browser
- name: Install xvfb
apt: name={{item}}
with_items:
- xvfb
- firefox
when: ansible_os_family == 'Debian'

- name: Install browser
apt: name={{item}}
with_items:
- firefox
when: ansible_os_family == 'Debian' and selenium_install_firefox == 'true'

- name: Install browser Xvfb
yum: name={{item}}
with_items:
- xorg-x11-server-Xvfb
- firefox
when: ansible_os_family == 'RedHat'

- name: Install browser
yum: name={{item}}
with_items:
- firefox
when: ansible_os_family == 'RedHat' and selenium_install_firefox == 'true'


- name: install
template: src=selenium-init-{{ ansible_os_family }}.j2 dest=/etc/init.d/selenium owner=root group=root mode=0755
tags: [configuration, selenium, selenium-install]
Expand Down

0 comments on commit 7fa6781

Please sign in to comment.