Skip to content

Etherpad pre-filled pages #8044

@ikke-t

Description

@ikke-t

Is your feature request related to a problem? Please describe.

In Ansible EDA & Dynatrace escape room we found etherpad good for simple "breakout rooms" feature. But for that to work, we would need to have number of pages pre-generated. Like one instruction page, and 15 team rooms. I'm writing here my findings for later what would it take.

Describe the solution you'd like

I'd like to have a task in ansible etherpad role that adds a page with given content. I checked from etherpad docs that it has an API to do this. To add pages we would need to:

  1. Add config/secret file and map it to file called APIKEY.txt at root of container:
       Authentication
    
       Authentication works via a token that is sent with each request as a post parameter. There is a single token per Etherpad deployment. This token will be random string, generated by Etherpad at the first start. It will be saved in APIKEY.txt in the root folder of Etherpad. Only Etherpad and the requesting application knows this key. Token management will not be exposed through this API.
    
  2. We could then create given pages via ansible http POST as described in the doc. A rough example with curl here:
     #!/bin/bash
    
     # Configuration
     API_KEY="YOUR_API_KEY"
     PAD_NAME="welcomePad"
     ETHERPAD_URL="http://your-etherpad-instance"
    
     # Step 1: Create a new pad
     curl "${ETHERPAD_URL}/api/1/createPad?apikey=${API_KEY}&padID=${PAD_NAME}"
    
     # Step 2: Set the text of the new pad
     curl --data "apikey=${API_KEY}&padID=${PAD_NAME}&text=welcome%20to%20etherpad" "${ETHERPAD_URL}/api/1/setText"
    

Describe alternatives you've considered
currently the lab organizer needs to copy paste several pages at lab start, and modify them according to lab details.

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions