Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
2548b47d
Commit
2548b47d
authored
Dec 16, 2016
by
George Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tag tasks
parent
148a84f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
playbooks/roles/browsers/tasks/main.yml
+54
-0
No files found.
playbooks/roles/browsers/tasks/main.yml
View file @
2548b47d
...
...
@@ -5,11 +5,18 @@
apt_key
:
url
:
"
https://dl-ssl.google.com/linux/linux_signing_key.pub"
state
:
present
tags
:
-
install
-
install:system-requirements
-
name
:
add Google Chrome repo to the sources list
apt_repository
:
repo
:
"
{{
chrome_repo
}}"
state
:
present
tags
:
-
install
-
install:system-requirements
-
name
:
lock Firefox version
copy
:
dest
:
/etc/apt/preferences.d/firefox-pinned-version
...
...
@@ -17,67 +24,114 @@
Package: firefox
Pin: {{ firefox_version }}
Pin-Priority: 1001
tags
:
-
install
-
install:system-requirements
-
name
:
install system packages
apt
:
name
:
"
{{
item
}}"
update_cache
:
yes
with_items
:
"
{{
browser_deb_pkgs
}}"
tags
:
-
install
-
install:system-requirements
-
name
:
download ChromeDriver
get_url
:
url={{ chromedriver_url }}
dest=/var/tmp/chromedriver_{{ chromedriver_version }}.zip
register
:
download_chromedriver
tags
:
-
install
-
install:system-requirements
-
name
:
unzip ChromeDriver tarfile
shell
:
unzip /var/tmp/chromedriver_{{ chromedriver_version }}.zip
chdir=/var/tmp
when
:
download_chromedriver.changed
tags
:
-
install
-
install:system-requirements
-
name
:
move ChromeDriver binary to /usr/local
shell
:
mv /var/tmp/chromedriver /usr/local/bin/chromedriver
when
:
download_chromedriver.changed
tags
:
-
install
-
install:system-requirements
-
name
:
make ChromeDriver binary executable
file
:
path=/usr/local/bin/chromedriver mode=0755
when
:
download_chromedriver.changed
tags
:
-
install
-
install:system-requirements
-
name
:
verify ChromeDriver location and mode
stat
:
path=/usr/local/bin/chromedriver
register
:
chromedriver
tags
:
-
install
-
install:system-requirements
-
assert
:
that
:
-
"
chromedriver.stat.exists"
-
"
chromedriver.stat.mode
==
'0755'"
tags
:
-
install
-
install:system-requirements
-
name
:
download PhantomJS
get_url
:
url
:
"
{{
phantomjs_url
}}"
dest
:
"
/var/tmp/{{
phantomjs_tarfile
}}"
register
:
download_phantom_js
tags
:
-
install
-
install:system-requirements
-
name
:
unpack the PhantomJS tarfile
shell
:
"
tar
-xjf
/var/tmp/{{
phantomjs_tarfile
}}"
args
:
chdir
:
"
/var/tmp"
when
:
download_phantom_js.changed
tags
:
-
install
-
install:system-requirements
-
name
:
move PhantomJS binary to /usr/local
shell
:
mv /var/tmp/{{ phantomjs_version }}/bin/phantomjs /usr/local/bin/phantomjs
when
:
download_phantom_js.changed
tags
:
-
install
-
install:system-requirements
-
name
:
verify phantomjs location
stat
:
path=/usr/local/bin/phantomjs
register
:
phantomjs
tags
:
-
install
-
install:system-requirements
-
assert
:
that
:
"
phantomjs.stat.exists"
tags
:
-
install
-
install:system-requirements
-
name
:
create xvfb systemd service
template
:
src=xvfb.service.j2 dest=/etc/systemd/system/xvfb.service owner=root group=root
tags
:
-
install
-
install:configuration
-
name
:
enable and start xvfb systemd service
systemd
:
name
:
xvfb
enabled
:
yes
state
:
started
tags
:
-
install
-
install:configuration
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment