diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-13 13:54:27 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-13 13:54:27 -0400 |
commit | 02575eee5ec6fffccb233a42ba3e82a990df8fe2 (patch) | |
tree | 61ebb1187f1b9ddc12fbd6228e6cd547511aa276 /pad/tasks | |
parent | 4b22599255be2095a235d1e962ccd3e05eadfbed (diff) | |
download | emacsconf-ansible-02575eee5ec6fffccb233a42ba3e82a990df8fe2.tar.xz emacsconf-ansible-02575eee5ec6fffccb233a42ba3e82a990df8fe2.zip |
Add proxy fallback for wikimedia
Diffstat (limited to 'pad/tasks')
-rw-r--r-- | pad/tasks/loadtest.yml | 11 | ||||
-rw-r--r-- | pad/tasks/main.yml | 24 |
2 files changed, 27 insertions, 8 deletions
diff --git a/pad/tasks/loadtest.yml b/pad/tasks/loadtest.yml new file mode 100644 index 0000000..28deefc --- /dev/null +++ b/pad/tasks/loadtest.yml @@ -0,0 +1,11 @@ +--- +- name: Install loadtest configuration + become: true + template: + src: loadtest.settings.json + dest: "{{ etherpad_path }}/settings.json" +- name: Restart Etherpad + become: true + service: + name: etherpad + state: restarted diff --git a/pad/tasks/main.yml b/pad/tasks/main.yml index bb3209d..4e2d5cc 100644 --- a/pad/tasks/main.yml +++ b/pad/tasks/main.yml @@ -3,6 +3,11 @@ - name: Set up packages as root become: true block: + - name: Add GPG + apt: + update_cache: yes + name: + - gpg - name: Add nodesource key apt_key: url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key @@ -15,6 +20,7 @@ apt: update_cache: yes name: + - git - systemd - sudo - nodejs @@ -44,10 +50,10 @@ dest: "{{ etherpad_path }}/settings.json" - name: Install dependencies shell: cd {{ etherpad_path }}; . src/bin/functions.sh; src/bin/installDeps.sh - - name: Install etherpad plugins - npm: - name: ep_pad-lister - path: "{{ etherpad_path }}" + # - name: Install etherpad plugins + # npm: + # name: ep_pad-lister + # path: "{{ etherpad_path }}" - name: Change ownership file: dest: /home/etherpad/etherpad @@ -80,8 +86,7 @@ group: root mode: 0755 when: use_initd is not defined -- name: Start Etherpad - tags: system +- name: Restart Etherpad become: true service: name: etherpad @@ -97,7 +102,7 @@ - name: Wait for OK tags: create-pads uri: - url: "http://localhost:9001/api/1/createPad?apikey={{ etherpad_api_key }}&padID={{etherpad_base}}-{{etherpad_year}}" + url: "http://localhost:9001/api/1/createPad?apikey={{ etherpad_api_key }}&padID={{etherpad_year}}" register: _result until: _result.status == 200 retries: 720 @@ -108,5 +113,8 @@ - name: Create pads tags: create-pads uri: - url: "http://localhost:9001/api/1/createPad?apikey={{ etherpad_api_key }}&padID={{etherpad_base}}-{{etherpad_year}}-{{ item.slug }}" + url: "http://localhost:9001/api/1/createPad?apikey={{ etherpad_api_key }}&padID={{etherpad_year}}-{{ item.slug }}" loop: "{{ talks | json_query('talks[*]') }}" +- include: loadtest.yml + become: true + when: load_test is defined |