Skip to content

nexus_default_role: empty variable causing role to fail #83

@felipe4334

Description

@felipe4334

By default, nexus_default_role variable is assigned the value of "", this will throw an error:

"javax.script.ScriptException: javax.validation.ConstraintViolationException: Validation failed; 1 constraints violated"

tasks/main.yml:

- name: Configure Default Role capability
  ansible.builtin.include_tasks: call_script.yml
  vars:
    script_name: setup_capability
    call_args:
      capability_typeId: defaultrole
      capability_enabled: "{{ (nexus_default_role | length > 0) }}"
      capability_properties:
        role: "{{ nexus_default_role }}"

This is fixed by setting nexus_default_role: "nx-anonymous", but this should be a default setting in defaults/main.yml or there should be a when: nexus_default_role | length > 0 statement for that task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions