|
1 | 1 | ---
|
2 |
| -script_server_url: https://github.com/bugy/script-server/releases/download/1.18.0/script-server.zip |
3 |
| -script_server_port: 5000 |
4 |
| - |
5 |
| -script_server_admin_users: &admin_users |
6 |
| - # hostnames or ips |
7 |
| - - backup |
8 |
| - - 127.0.0.1 |
9 |
| - |
10 |
| -# ansible hostgroups to ignore |
11 |
| -script_server_ignored_groups: |
12 |
| - - 'all' |
13 |
| - - 'ungrouped' |
14 |
| - - 'contestants' |
15 |
| - - 'contestants_wf46' |
16 |
| - - 'contestants_wf47' |
17 |
| - |
| 2 | +SCRIPT_SERVER_PORT: 5000 |
18 | 3 |
|
19 | 4 | script_server_commands:
|
20 |
| - - name: run-lastminute |
21 |
| - description: Runs the ansible playbook lastminute.yml |
22 |
| - group: ansible # for organization in script-server |
23 |
| - allowed_users: |
24 |
| - - backup # or 10.3.3.210 (the ansible template will resolve names to IPs) |
| 5 | + - name: make-invocations |
| 6 | + description: Run the make targets as last years |
| 7 | + parameters: |
| 8 | + - name: make_pattern |
| 9 | + type: multiselect |
| 10 | + separator: ' ' |
| 11 | + values: |
| 12 | + - admin |
| 13 | + - domserver |
| 14 | + - judgehost |
| 15 | + - grafana |
| 16 | + - cds |
| 17 | + content: | |
| 18 | + #!/bin/bash |
| 19 | + set -euxo pipefail |
| 20 | + if [ "$make_pattern" = "" ]; then |
| 21 | + exit 1 |
| 22 | + fi |
| 23 | + cd /home/domjudge/domjudge-scripts-checkout/provision-contest/ansible |
| 24 | + for make_single in $make_pattern; do |
| 25 | + make "$make_single" |
| 26 | + done |
| 27 | + - name: ansible-admin |
| 28 | + description: (Re)configure the (other) admin machines |
25 | 29 | content: |
|
26 |
| - #!/usr/bin/bash |
27 |
| - echo "hello world $HOSTPATTERN" |
| 30 | + #!/bin/bash |
| 31 | + set -euxo pipefail |
| 32 | + if [ "$host_pattern" = "" ]; then |
| 33 | + exit 1 |
| 34 | + fi |
| 35 | + if [ "$tag_pattern" != "" ]; then |
| 36 | + tag="--tags $tag_pattern" |
| 37 | + fi |
| 38 | + cd /home/domjudge/domjudge-scripts-checkout/provision-contest/ansible |
| 39 | + ansible-playbook --limit $host_pattern ${tag:-} admin.yml |
28 | 40 | parameters:
|
29 | 41 | - name: host_pattern
|
30 | 42 | # pass_as: env_variable # this is default
|
31 | 43 | # env_var: host_pattern # default is same as name
|
32 |
| - type: list |
33 |
| - values: |
34 |
| - - all |
35 |
| - - backup |
36 |
| - - packages |
37 |
| - - scoreboard |
38 |
| - - cds |
| 44 | + type: multiselect |
| 45 | + values: "{{ groups['admin'] }}" |
| 46 | + default: "{{ groups['admin'] | difference(['domjudge-ccsadmin2']) }}" |
| 47 | + - name: tag_pattern |
| 48 | + type: "multiselect" |
| 49 | + values: ["reboot"] |
| 50 | + default: [] |
39 | 51 |
|
40 | 52 | script_server_command_defaults:
|
41 | 53 | output_format: terminal
|
42 | 54 | # scheduling: # Don't allow scheduling, the ui for it is not good...
|
43 |
| - # enabled: false |
| 55 | + # enabled: false |
0 commit comments