main.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ---
  2. # Ensures there is an instance of RHBoK running in a configurable namespace.
  3. #
  4. # Configures it with a realm, and some users.
  5. #
  6. # Required variables (some are supplied by defaults/main.yml):
  7. #
  8. # rhbk:
  9. # namespace: namespace to deploy to (keycloak)
  10. # name: name of the instance (sso)
  11. # replicas: how many instances
  12. # fqdn: fqdn of the route (hostname), detected if omitted
  13. # admin: bootstrap admin credentials
  14. # username: username (rhbk)
  15. # password: password (secret)
  16. # db: database-specific settings
  17. # image: db server image
  18. # name: database name (rhbk)
  19. # username: database owner (rhbk)
  20. # password: db owner's password (secret)
  21. # claim_modes:[] volume claim template access modes, list (ReadWriteOnce)
  22. # storage_class: storage class name, no default (omitted)
  23. # size: pvc size (1Gi)
  24. # replicas: how many instances (TODO ignored for now)
  25. # realm: name of the realm (sample-realm)
  26. # clients:[] a list of clients to create in the realm
  27. # - id: clientId
  28. # name: client (human readable) name (client.id)
  29. # secret: the client secret, if used
  30. # base_url: the base URL for redirects and other bits
  31. # users: users to create in realm, no default (meaning no users)
  32. # - username: required (as it is key)
  33. # password: optional, defaults to "secret"
  34. # fullname: optional, set to username if empty
  35. # email: optional, set to username@example.com if empty
  36. # state: present (default) or absent (removes a RHBK instance if found)
  37. #
  38. # NOTE: Use rhbk_state to override rhbk.state from command line.
  39. #
  40. # NOTE: Must have an operator deployed in that namespace prior (use deploy-operators role for that).
  41. #
  42. - name: Pick up whatever value we can for rhbk.state.
  43. ansible.builtin.set_fact:
  44. rhbk_action: "{{ rhbk_state | default(rhbk.state | default('present')) }}"
  45. - name: Include the correct set of tasks.
  46. ansible.builtin.include_tasks:
  47. file: tasks/{{ rhbk_action }}.yml
  48. ...