From 99b35997fa6ee4463258819b711a4ff60ae5bac7 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Thu, 25 Jan 2018 14:23:57 +0300 Subject: [PATCH 1/6] Check ansible install from pip --- .travis.yml | 3 ++- README.md | 66 +++++++++++++++++++++++------------------------ defaults/main.yml | 10 +++---- 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 19f80e7..641faf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,8 @@ install: - sudo apt-get install -y sshpass software-properties-common python-software-properties - sudo apt-add-repository -y ppa:ansible/ansible - sudo apt-get update -qq - - sudo apt-get install -y ansible + - sudo pip install ansible + # - sudo apt-get install -y ansible - echo -e 'localhost ansible_connection=local' > tests/inventory - echo -e '[defaults]\nroles_path = ../\nhostfile = ./tests/inventory' > ansible.cfg - sudo rm /usr/bin/python && sudo ln -s /usr/bin/python2.7 /usr/bin/python diff --git a/README.md b/README.md index b574c03..50b24f2 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,11 @@ grid_router_docker_api_version: 1.24 # Docker api version (for GridRouter) grid_router_host_list: group # Host list for selenoid.xml grid_router_regions: # Hosts list per region - - name: "region-1" - hosts: - - name: localhost - port: 4444 - browser_count: 4 - + - name: "region-1" + hosts: + - name: localhost + port: 4444 + browser_count: 4 grid_router_browsers: # Browser list usage selenoid - name: "firefox" @@ -56,18 +55,18 @@ You can override collection browsers `grid_router_browsers` according to your ne For example: ```yaml grid_router_browsers: - - name: "firefox" - defaultVersion: "54.0" - versions: - - "54.0" - - name: "chrome" - defaultVersion: "59.0" - versions: - - "59.0" - - name: "opera" - defaultVersion: "45.0" - versions: - - "45.0" + - name: "firefox" + defaultVersion: "54.0" + versions: + - "54.0" + - name: "chrome" + defaultVersion: "59.0" + versions: + - "59.0" + - name: "opera" + defaultVersion: "45.0" + versions: + - "45.0" ``` All supported browsers see [here](https://github.com/aerokube/selenoid#ready-to-use-browser-images). @@ -83,29 +82,28 @@ Ggr is [using](http://aerokube.com/ggr/latest/#_creating_users_file) htpasswd fi grid_router_path: "{{ ansible_env.HOME }}/grid-router" grid_router_qouta_path: "{{ ansible_env.HOME }}/grid-router/quota" grid_router_port: 4445 - + grid_router_regions: - - name: "region-1" - hosts: - - name: 192.168.1.1 - port: 4444 - browser_count: 4 - - name: 192.168.1.2 - port: 4445 - browser_count: 4 - + - name: "region-1" + hosts: + - name: 192.168.1.1 + port: 4444 + browser_count: 4 + - name: 192.168.1.2 + port: 4445 + browser_count: 4 + grid_router_browsers: - - name: "chrome" - defaultVersion: "62.0" - versions: - - "62.0" - - "63.0" + - name: "chrome" + defaultVersion: "62.0" + versions: + - "62.0" + - "63.0" roles: - gridrouter-docker ``` ## Dependencies - None ## Contributing diff --git a/defaults/main.yml b/defaults/main.yml index 99f0b2e..2805796 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,11 +11,11 @@ grid_router_docker_api_version: 1.24 # Docker api version (for GridRouter) grid_router_host_list: group # Host list for selenoid.xml grid_router_regions: # Hosts list per region - - name: "region-1" - hosts: - - name: localhost - port: 4444 - browser_count: 4 + - name: "region-1" + hosts: + - name: localhost + port: 4444 + browser_count: 4 grid_router_browsers: # Browser list usage selenoid - name: "firefox" From 3789c5762eb43516a1a1b9d0fb15b1f0d62278c0 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Thu, 25 Jan 2018 14:31:47 +0300 Subject: [PATCH 2/6] Check ansible version 2.1.0.0 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 641faf4..161042d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,9 @@ before_install: install: - sudo pip install docker-py - sudo apt-get install -y sshpass software-properties-common python-software-properties - - sudo apt-add-repository -y ppa:ansible/ansible - - sudo apt-get update -qq - - sudo pip install ansible + # - sudo apt-add-repository -y ppa:ansible/ansible + # - sudo apt-get update -qq + - sudo pip install ansible==2.1.0.0 # - sudo apt-get install -y ansible - echo -e 'localhost ansible_connection=local' > tests/inventory - echo -e '[defaults]\nroles_path = ../\nhostfile = ./tests/inventory' > ansible.cfg From 8c27c36f27c9d632613c453ae4de4c6207306d59 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Thu, 25 Jan 2018 14:37:07 +0300 Subject: [PATCH 3/6] Check ansible version 2.2.0.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 161042d..b0d93f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ install: - sudo apt-get install -y sshpass software-properties-common python-software-properties # - sudo apt-add-repository -y ppa:ansible/ansible # - sudo apt-get update -qq - - sudo pip install ansible==2.1.0.0 + - sudo pip install ansible==2.2.0.0 # - sudo apt-get install -y ansible - echo -e 'localhost ansible_connection=local' > tests/inventory - echo -e '[defaults]\nroles_path = ../\nhostfile = ./tests/inventory' > ansible.cfg From c0609c4f9d9532c500da0159e332b186912722d4 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Thu, 25 Jan 2018 14:39:39 +0300 Subject: [PATCH 4/6] Added group: deprecated-2017Q4 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index b0d93f4..68af0db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ --- language: python python: "2.7" +group: deprecated-2017Q4 sudo: required dist: trusty services: From 3a0bb514ea916d4fefc08413fa8c1cf2d5ee9ff0 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Thu, 25 Jan 2018 14:40:36 +0300 Subject: [PATCH 5/6] Set valid min-ansible-version --- meta/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/main.yml b/meta/main.yml index 183e1e1..0815f10 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -3,7 +3,7 @@ galaxy_info: description: | Ansible role to manage and run the gridrouter docker container. company: Iqoption Ltd. - min_ansible_version: 2.1 + min_ansible_version: 2.2 platforms: - name: Ubuntu versions: From 8fa50ae37ad85d60c743dab9341cf2d48c2652e7 Mon Sep 17 00:00:00 2001 From: Arslanbekov Denis Date: Thu, 25 Jan 2018 14:43:13 +0300 Subject: [PATCH 6/6] Remove install ansible from apt --- .travis.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 68af0db..4e04356 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ --- language: python python: "2.7" -group: deprecated-2017Q4 sudo: required +group: deprecated-2017Q4 dist: trusty services: - docker @@ -13,10 +13,7 @@ before_install: install: - sudo pip install docker-py - sudo apt-get install -y sshpass software-properties-common python-software-properties - # - sudo apt-add-repository -y ppa:ansible/ansible - # - sudo apt-get update -qq - - sudo pip install ansible==2.2.0.0 - # - sudo apt-get install -y ansible + - sudo pip install ansible - echo -e 'localhost ansible_connection=local' > tests/inventory - echo -e '[defaults]\nroles_path = ../\nhostfile = ./tests/inventory' > ansible.cfg - sudo rm /usr/bin/python && sudo ln -s /usr/bin/python2.7 /usr/bin/python