diff options
Diffstat (limited to '')
-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 |