diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a1acba..65a82c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: run: | python -m pip install --upgrade pip pip install yamllint 'molecule[docker]~=3.5.2' ansible-core flake8 ansible-lint voluptuous + pip install -r requirements.txt - name: Create default collection path run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7698001 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ + +## Contributor's Guidelines + +- All YAML files named with '.yml' extension +- Use spaces around jinja variables. `{{ var }}` over `{{var}}` +- Variables that are internal to the role should be lowercase and start with the role name +- Keep roles self contained - Roles should avoid including tasks from other roles when possible +- Plays should do nothing more than include a list of roles except where `pre_tasks` and `post_tasks` are required when possible +- Separators - Use valid name, ie. underscores (e.g. `my_role` `my_playbook`) not dashes (`my-role`) +- Paths - When defining paths, do not include trailing slashes (e.g. `my_path: /foo` not `my_path: /foo/`). When concatenating paths, follow the same convention (e.g. `{{ my_path }}/bar` not `{{ my_path }}bar`) +- Indentation - Use 2 spaces for each indent +- `vars/` vs `defaults/` - internal or interpolated variables that don't need to change or be overridden by user go in `vars/`, those that a user would likely override, go under `defaults/` directory +- All arguments have a specification in `meta/argument_specs.yml` +- All playbooks/roles should be focused on compatibility with Ansible Tower diff --git a/molecule/default/requirements.yml b/molecule/default/requirements.yml index ca255ec..9aa3437 100644 --- a/molecule/default/requirements.yml +++ b/molecule/default/requirements.yml @@ -2,8 +2,8 @@ collections: - name: middleware_automation.redhat_csp_download version: ">=1.2.1" - - name: middleware_automation.jcliff - version: ">=0.0.19" + - name: middleware_automation.wildfly + version: ">=0.0.5" - name: community.general - name: community.docker version: ">=1.9.1" diff --git a/requirements.yml b/requirements.yml index 1cca528..ab434b2 100644 --- a/requirements.yml +++ b/requirements.yml @@ -2,6 +2,6 @@ collections: - name: middleware_automation.redhat_csp_download version: ">=1.2.1" - - name: middleware_automation.jcliff - version: ">=0.0.19" + - name: middleware_automation.wildfly + version: ">=0.0.5" - name: community.general diff --git a/roles/keycloak/tasks/install.yml b/roles/keycloak/tasks/install.yml index af7e022..c5e5179 100644 --- a/roles/keycloak/tasks/install.yml +++ b/roles/keycloak/tasks/install.yml @@ -160,7 +160,6 @@ - name: "Install {{ keycloak_jdbc_engine }} driver" include_role: name: wildfly_driver - tasks_from: jdbc_driver.yml vars: wildfly_user: "{{ keycloak_service_user }}" jdbc_driver_module_dir: "{{ keycloak_jdbc[keycloak_jdbc_engine].driver_module_dir }}" diff --git a/roles/keycloak_realm/defaults/main.yml b/roles/keycloak_realm/defaults/main.yml index a7897cc..7303629 100644 --- a/roles/keycloak_realm/defaults/main.yml +++ b/roles/keycloak_realm/defaults/main.yml @@ -12,23 +12,25 @@ keycloak_auth_client: admin-cli ### List of Keycloak User Federation keycloak_user_federation: [] -### Keycloak realm client defaults +### Keycloak realms, clients, roles # list of clients to create in the realm # # Refer to the playbook for a comprehensive example. +# Also refer to meta/argument_specs.yml for specifications. # # Each client has the form: # { name: '', roles: [], realm: '', public_client: bool, web_origins: '', users: [] } # where roles is a list of default role names for the client # and users is a list of account, see below for the format definition # an empty name will skip the creation of the client -keycloak_clients: - - name: '' - roles: "{{ keycloak_client_default_roles }}" - realm: "{{ keycloak_realm }}" - public_client: "{{ keycloak_client_public }}" - web_origins: "{{ keycloak_client_web_origins }}" - users: "{{ keycloak_client_users }}" +# +#keycloak_clients: +# - name: '' +# roles: "{{ keycloak_client_default_roles }}" +# realm: "{{ keycloak_realm }}" +# public_client: "{{ keycloak_client_public }}" +# web_origins: "{{ keycloak_client_web_origins }}" +# users: "{{ keycloak_client_users }}" # list of roles to create in the client keycloak_client_default_roles: []