ansible-middleware / keycloak

Collection to install and configure Keycloak or Red Hat Single Sign-On / Red Hat Build of Keycloak
Apache License 2.0
82 stars 49 forks source link

Use `keycloak_realm` as default for sub-entities #180

Closed guidograzioli closed 2 months ago

guidograzioli commented 2 months ago

Default realm for entities like federation or client to keycloak_realm top-level variable when the dictionary key is not defined. This allows to reduce:

  roles:
    - role: middleware_automation.keycloak.keycloak_realm
      keycloak_realm: TestRealm
      keycloak_clients:
        - name: TestClient1
          client_id: TestClient1
          realm: TestRealm
          users:
            - username: TestUser
              password: password
              client_roles:
                - client: TestClient1
                  role: TestClient1User
                  realm: TestRealm

to:

  roles:
    - role: middleware_automation.keycloak.keycloak_realm
      keycloak_realm: TestRealm
      keycloak_clients:
        - name: TestClient1
          client_id: TestClient1
          users:
            - username: TestUser
              password: password
              client_roles:
                - client: TestClient1
                  role: TestClient1User

Fix #179