+
+ - name: Install libxml2-utils
+ apt:
+ name: libxml2-utils
+ state: present
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - apt_repository:
+ repo: ppa:deadsnakes/ppa
+ state: present
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Update and upgrade apt packages
+ apt:
+ upgrade: 'yes'
+ update_cache: yes
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Install Python 3.6 and packages
+ apt:
+ name:
+ - python3.6
+ - python3.6-dev
+ - python3.6-tk
+ - libssl-dev
+ - libmysqlclient-dev
+ - gcc
+ - python3-venv
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Install Python 3.7
+ apt:
+ name:
+ - python3.7
+ - python3.7-dev
+ - python3.7-tk
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Install Python 3.8
+ apt:
+ name:
+ - python3.8
+ - python3.8-dev
+ - python3.8-tk
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Install Python 3.9
+ apt:
+ name:
+ - python3.9
+ - python3.9-dev
+ - python3.9-tk
+ - python3.9-distutils
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Install nodejs-dev libssl1.0-dev dep
+ apt:
+ name:
+ - libssl1.0-dev
+ update_cache: yes
+ state: fixed
+ become: true
+ when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
+
+ - name: Install nodejs-dev dep for npm
+ apt:
+ name:
+ - nodejs-dev
+ update_cache: yes
+ state: fixed
+ become: true
+ when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
+
+ - name: Install libnode-dev dep for npm
+ apt:
+ name: libnode-dev
+ update_cache: yes
+ state: fixed
+ become: true
+ when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
+
+ - name: Install supporting packages (Ubuntu 18.04)
+ apt:
+ name:
+ - unzip
+ - xz-utils
+ - libxml-xpath-perl
+ - wget
+ - make
+ - sshuttle
+ - netcat
+ - libssl-dev
+ - libffi-dev
+ - xmlstarlet
+ - xvfb
+ - crudini
+ - maven
+ - python-ncclient
+ update_cache: yes
+ state: fixed
+ become: true
+ when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
+
+ - name: Install supporting packages (Ubuntu 20.04)
+ apt:
+ name:
+ - unzip
+ - xz-utils
+ - libxml-xpath-perl
+ - wget
+ - make
+ - sshuttle
+ - netcat
+ - libssl-dev
+ - libffi-dev
+ - xmlstarlet
+ - xvfb
+ - crudini
+ - maven
+ - python3-ncclient
+ update_cache: yes
+ state: fixed
+ become: true
+ when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
+
+ - name: Install npm and addon packages
+ apt:
+ name:
+ - nodejs
+ - npm
+ - node-gyp
+ update_cache: yes
+ state: fixed
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: npm self-update
+ command: npm install npm@{{ npm_version }} -g
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: npm install n module
+ command: npm install n -g
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Upgrade latest stable node version
+ command: n stable | PATH="$PATH"
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Add Google Chrome key
+ apt_key:
+ url: https://dl-ssl.google.com/linux/linux_signing_key.pub
+ state: present
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: Add Google Chrome repo
+ copy: content="deb http://dl.google.com/linux/chrome/deb/ stable main" dest={{apt_file}} owner=root group=root mode=644
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: Update apt cache
+ apt: update_cache=yes
+ become: true
+ when: ansible_distribution == 'Ubuntu'
+
+ - name: Install Google Chrome
+ apt:
+ name: google-chrome-stable
+ state: present
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: Install Erlang dependency packages
+ apt:
+ name:
+ - libsctp1
+ - libwxbase3.0-0v5
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: Install Erlang dependency package libwxgtk3 for 18.04
+ apt:
+ name:
+ - libwxgtk3.0-0v5
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
+
+ - name: Install Erlang dependency package libwxgtk3 for 20.04
+ apt:
+ name:
+ - libwxgtk3.0-gtk3-0v5
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
+
+ - name: Download and install libssl Ubuntu 20.04
+ apt:
+ deb: http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.10_amd64.deb
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
+
+ - name: Install Erlang
+ apt:
+ deb: https://packages.erlang-solutions.com/erlang/debian/pool/esl-erlang_24.1-1~ubuntu~trusty_amd64.deb
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: 'Download latest rebar3 bin'
+ command: curl -o /usr/bin/rebar3 -L "https://s3.amazonaws.com/rebar3/rebar3"
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - file:
+ path: /usr/bin/rebar3
+ mode: "+x"
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: Download geckodriver
+ unarchive:
+ src: https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz
+ dest: /usr/bin
+ mode: 0755
+ remote_src: yes
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: Download Firefox version 55.0.3
+ unarchive:
+ src: https://download-installer.cdn.mozilla.net/pub/firefox/releases/55.0.3/linux-x86_64/en-US/firefox-55.0.3.tar.bz2
+ dest: /opt
+ mode: 0755
+ remote_src: yes
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: Create symbolic link to firefox bin
+ file:
+ src: "/opt/firefox/firefox"
+ dest: "/usr/bin/firefox"
+ state: link
+ become: true
+ when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu'
+
+ - name: Install jinja2
+ pip:
+ name: jinja2
+ state: present
+ become: true
+ when: ansible_architecture == 'x86_64'