Using ansible to self-service account activation
Webpage |----| Ansible |----| Google AppScript |----| Google Sheet
Use ansible to manage a self service account activation process:
- User will access webpage to request account
- Ansible will generate an activation key and
2a. Ansible will send email with activation link
2b. Ansible will send activation key to Google AppScript - Google AppScript will assign the key with an expiry time and store into GoogleSheet
- When user click on the activation link, it will activate and redirect to the portal
- Ansible will poll Google AppScript to check if user activated the link
- Ansible will create account if poll result is positive
- User can login using the created account
- main.yml
roles/account_activation:- tasks/main.yml
- templates/email_template.j2
- request.html
- account creation page
- index.html
- general login page meant to replace guacamole default page
- doGet(e)
e is query type:
- add -
- activate - when request send over
- query - lookup the alive time of the activationkey
- delete - delete activition key after activated
- addUserActKey(a,b)
- a is activationkey
- b is expirydate
- getTable()
- setState(e,s)
- retrieve whole table and loop to find the key to set state of key
- activateUser(actKey)
- return the status of the activation
- deleteRecord(actKey)
- cleanup