main.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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:
  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. # direct_grants: whether to allow direct grants (yes if you allow CLI login, no otherwise, default true)
  32. # map_groups: whether to map groups into a groups claim (default true)
  33. # groups:[] groups to create in the realm, no default (meaning no groups)
  34. # users: users to create in realm, no default (meaning no users)
  35. # - username: required (as it is key)
  36. # password: optional, defaults to "secret"
  37. # email: optional, set to username@example.com if empty
  38. # firstname: optional
  39. # lastname: optional
  40. # groups:[] groups the user should be a member of
  41. # state: present (default) or absent (removes a RHBK instance if found)
  42. #
  43. # NOTE: Use rhbk_state to override rhbk.state from command line.
  44. #
  45. # NOTE: Must have an operator deployed in that namespace prior (use deploy-operators role for that).
  46. #
  47. - name: Pick up whatever value we can for rhbk.state.
  48. ansible.builtin.set_fact:
  49. rhbk_action: "{{ rhbk_state | default(rhbk.state | default('present')) }}"
  50. - name: Include the correct set of tasks.
  51. ansible.builtin.include_tasks:
  52. file: tasks/{{ rhbk_action }}.yml
  53. ...