Selenoid doesn't download docker images by himself, so this playbook does it. Therefore you need to install docker-py python package before running it (I don't know how is you manage your python modules, so I don't want to install something in unusual way in your environment). Look at the docker_image ansible module documentation to more information about how this playbook manage docker images.
You can install this role with ansible-galaxy:
ansible-galaxy install -c vv-p.selenoid-systemd -p ./
Or just download it with git as usual:
git clone https://github.com/vv-p/selenoid-systemd.git
Just create your own playbook file, check environment variables in defaults/main.yml and run:
cat > selenoid.yml << EOF
---
- hosts: selenoid
roles:
- selenoid-systemd
EOF
ansible-playbook -b -i hosts selenoid.yml
All default variable values stored in defaults/main.yml file:
selenoid_ui: false
selenoid_vnc: false
selenoid_shmSize: 268435456
selenoid_tmpSize: 512m
selenoid_varSize: 128m
selenoid_timezone: "Europe/Moscow"
selenoid_port: 4444
selenoid_ui_port: 8080
selenoid_browsers:
- name: "chrome"
default: "66.0"
versions:
- "66.0"
- "65.0"
- name: "firefox"
default: "59.0"
versions:
- "59.0"
- "58.0"
- name: "opera"
default: "52.0"
versions:
- "52.0"
- "51.0"
Look at the official selenoid page to more information - Selenoid Documentation
You can overwrite it in your playbook file:
- hosts: all
vars:
selenoid_ui: true
selenoid_vnc: true
- name: "chrome"
default: "66.0"
versions:
- "66.0"
- "65.0"
roles:
- selenoid-systemd
or pass it as command-line arguments:
ansible-playbool -b -i hosts selenoid.yml --extra-vars "selenoid_vnc=true"
Look at the Ansible documentation for details.
systemctl status selenoid
systemctl start selenoid
systemctl stop selenoid
journalctl -u selenoid -f