Skip to content

Commit

Permalink
Merge pull request #4 from iqoption/template-input-json
Browse files Browse the repository at this point in the history
make template of input.json file
  • Loading branch information
vladimir-kozyrev authored Jan 12, 2018
2 parents 2eed992 + f6827f3 commit d351f85
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 114 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ grid_router_qouta_password: selenoid
grid_router_qouta_user: selenoid
grid_router_gr_path: /etc/grid-router
grid_router_docker_api_version: 1.24
grid_router_host_list: group1
grid_router_region: region1
grid_router_host_name: selenoid[1:10].example.com
109 changes: 0 additions & 109 deletions files/input.json

This file was deleted.

10 changes: 5 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
state: directory
mode: 0755

- name: Grid Router | Copy input json
copy:
src: input.json
dest: "{{ grid_router_qouta_path }}"
- name: Grid Router | Copy quota json template
template:
src: quota_template.json.j2
dest: "{{ grid_router_qouta_path }}/quota_template.json"
mode: 0644

- name: Grid Router | Generate quota file
shell: sctl generate --inputFile "{{ grid_router_qouta_path }}/input.json" --outputDirectory "{{ grid_router_qouta_path }}"
shell: sctl generate --inputFile "{{ grid_router_qouta_path }}/quota_template.json" --outputDirectory "{{ grid_router_qouta_path }}"
args:
creates: "{{ grid_router_qouta_path }}/selenoid.xml"

Expand Down
109 changes: 109 additions & 0 deletions templates/quota_template.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"hosts": {
"{{ grid_router_host_list }}": {
"{{ grid_router_region }}": {
"{{ grid_router_host_name }}": {
"port": 4444,
"count": 1
}
}
}
},
"quota": {
"selenoid": {
"firefox": {
"defaultVersion": "54.0",
"versions": {
"54.0": "{{ grid_router_host_list }}",
"53.0": "{{ grid_router_host_list }}",
"52.0": "{{ grid_router_host_list }}",
"51.0": "{{ grid_router_host_list }}",
"50.0": "{{ grid_router_host_list }}",
"49.0": "{{ grid_router_host_list }}",
"48.0": "{{ grid_router_host_list }}",
"47.0": "{{ grid_router_host_list }}",
"46.0": "{{ grid_router_host_list }}",
"45.0": "{{ grid_router_host_list }}",
"44.0": "{{ grid_router_host_list }}",
"43.0": "{{ grid_router_host_list }}",
"42.0": "{{ grid_router_host_list }}",
"41.0": "{{ grid_router_host_list }}",
"40.0": "{{ grid_router_host_list }}",
"39.0": "{{ grid_router_host_list }}",
"38.0": "{{ grid_router_host_list }}",
"37.0": "{{ grid_router_host_list }}",
"36.0": "{{ grid_router_host_list }}",
"35.0": "{{ grid_router_host_list }}",
"34.0": "{{ grid_router_host_list }}",
"33.0": "{{ grid_router_host_list }}",
"32.0": "{{ grid_router_host_list }}",
"31.0": "{{ grid_router_host_list }}",
"30.0": "{{ grid_router_host_list }}",
"29.0": "{{ grid_router_host_list }}",
"28.0": "{{ grid_router_host_list }}",
"27.0": "{{ grid_router_host_list }}",
"26.0": "{{ grid_router_host_list }}",
"25.0": "{{ grid_router_host_list }}",
"24.0": "{{ grid_router_host_list }}",
"23.0": "{{ grid_router_host_list }}",
"22.0": "{{ grid_router_host_list }}",
"21.0": "{{ grid_router_host_list }}",
"20.0": "{{ grid_router_host_list }}",
"19.0": "{{ grid_router_host_list }}",
"18.0": "{{ grid_router_host_list }}",
"17.0": "{{ grid_router_host_list }}",
"16.0": "{{ grid_router_host_list }}",
"15.0": "{{ grid_router_host_list }}",
"14.0": "{{ grid_router_host_list }}",
"13.0": "{{ grid_router_host_list }}",
"12.0": "{{ grid_router_host_list }}",
"11.0": "{{ grid_router_host_list }}",
"10.0": "{{ grid_router_host_list }}",
"9.0": "{{ grid_router_host_list }}",
"8.0": "{{ grid_router_host_list }}",
"7.0": "{{ grid_router_host_list }}",
"6.0": "{{ grid_router_host_list }}",
"5.0": "{{ grid_router_host_list }}",
"4.0": "{{ grid_router_host_list }}",
"3.6": "{{ grid_router_host_list }}"
}
},
"chrome": {
"defaultVersion": "59.0",
"versions": {
"59.0": "{{ grid_router_host_list }}",
"58.0": "{{ grid_router_host_list }}",
"57.0": "{{ grid_router_host_list }}",
"56.0": "{{ grid_router_host_list }}",
"55.0": "{{ grid_router_host_list }}",
"54.0": "{{ grid_router_host_list }}",
"53.0": "{{ grid_router_host_list }}",
"52.0": "{{ grid_router_host_list }}",
"51.0": "{{ grid_router_host_list }}",
"50.0": "{{ grid_router_host_list }}",
"49.0": "{{ grid_router_host_list }}",
"48.0": "{{ grid_router_host_list }}"
}
},
"opera": {
"defaultVersion": "45.0",
"versions": {
"45.0": "{{ grid_router_host_list }}",
"44.0": "{{ grid_router_host_list }}",
"43.0": "{{ grid_router_host_list }}",
"42.0": "{{ grid_router_host_list }}",
"41.0": "{{ grid_router_host_list }}",
"40.0": "{{ grid_router_host_list }}",
"39.0": "{{ grid_router_host_list }}",
"38.0": "{{ grid_router_host_list }}",
"37.0": "{{ grid_router_host_list }}",
"36.0": "{{ grid_router_host_list }}",
"35.0": "{{ grid_router_host_list }}",
"34.0": "{{ grid_router_host_list }}",
"33.0": "{{ grid_router_host_list }}",
"12.16": "{{ grid_router_host_list }}"
}
}
}
}
}

0 comments on commit d351f85

Please sign in to comment.