Last active
July 27, 2018 12:55
-
-
Save DMeechan/3e801e83a2eb6580e2ccab175bf4c582 to your computer and use it in GitHub Desktop.
DevOps Course Chapter 2 - Ansible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: mygroup | |
become: yes | |
become_method: sudo | |
vars: | |
NODEJS_VERSION: "10" | |
ansible_become_pass: devops | |
gecko_version: 0.17.0 | |
selenium_install_firefox: yes | |
selenium_install_chrome: no | |
selenium_version: 3.12.0 | |
pre_tasks: | |
- name: Install Java | |
apt: | |
name: default-jre | |
state: present | |
update_cache: yes | |
roles: | |
- arknoll.selenium | |
tasks: | |
- name: Installs Git version control | |
apt: | |
name: git | |
state: present | |
update_cache: yes | |
- name: Install GPG key for Node.js | |
apt_key: | |
url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" | |
state: present | |
- name: Install the Node.js LTS repository | |
apt_repository: | |
repo: "deb https://deb.nodesource.com/node_{{ NODEJS_VERSION }}.x {{ ansible_distribution_release }} main" | |
state: present | |
update_cache: yes | |
- name: Install Node.js | |
apt: | |
name: nodejs | |
state: present | |
- name: Download the gecko driver | |
get_url: | |
url="https://github.com/mozilla/geckodriver/releases/download/v{{ gecko_version }}/geckodriver-v{{ gecko_version }}-linux64.tar.gz" dest=/tmp mode=0777 | |
- name: Install the gecko driver | |
unarchive: | |
src="/tmp/geckodriver-v{{ gecko_version }}-linux64.tar.gz" | |
dest=/usr/local/bin/ | |
mode=0700 | |
copy=no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment