From 21cad60286915e1d201d3ce977418f7ac2dc47a6 Mon Sep 17 00:00:00 2001 From: ivarmu <26822043+ivarmu@users.noreply.github.com> Date: Mon, 31 Jul 2023 10:12:48 +0200 Subject: [PATCH] fix lintering issues --- roles/applications/tasks/main.yml | 4 ++-- roles/credential_input_sources/tasks/main.yml | 4 ++-- roles/credential_types/tasks/main.yml | 6 +++--- roles/credentials/tasks/main.yml | 12 ++++++------ roles/filetree_create/tasks/users.yml | 4 ---- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/roles/applications/tasks/main.yml b/roles/applications/tasks/main.yml index 3ea5f8b07..cc56dfad2 100644 --- a/roles/applications/tasks/main.yml +++ b/roles/applications/tasks/main.yml @@ -5,11 +5,11 @@ name: "{{ __application_item.name | mandatory }}" new_name: "{{ __application_item.new_name | default(omit, true) }}" organization: "{{ __application_item.organization | mandatory }}" - description: "{{ __application_item.description | default(( '' if controller_configuration_applications_enforce_defaults else omit), true) }}" + description: "{{ __application_item.description | default(('' if controller_configuration_applications_enforce_defaults else omit), true) }}" authorization_grant_type: "{{ __application_item.authorization_grant_type | default('password') }}" client_type: "{{ __application_item.client_type | default('public') }}" redirect_uris: "{{ __application_item.redirect_uris | default([]) }}" - skip_authorization: "{{ __application_item.skip_authorization | default(( false if controller_configuration_applications_enforce_defaults else omit), true) }}" + skip_authorization: "{{ __application_item.skip_authorization | default((false if controller_configuration_applications_enforce_defaults else omit), true) }}" state: "{{ __application_item.state | default(controller_state | default('present')) }}" # Role specific options diff --git a/roles/credential_input_sources/tasks/main.yml b/roles/credential_input_sources/tasks/main.yml index bb4ab20b8..c0d93c211 100644 --- a/roles/credential_input_sources/tasks/main.yml +++ b/roles/credential_input_sources/tasks/main.yml @@ -4,8 +4,8 @@ target_credential: "{{ __cred_input_src_item.target_credential | mandatory }}" input_field_name: "{{ __cred_input_src_item.input_field_name | mandatory }}" source_credential: "{{ __cred_input_src_item.source_credential | default(omit, true) }}" - description: "{{ __cred_input_src_item.description | default(( '' if controller_configuration_credential_input_sources_enforce_defaults else omit), true) }}" - metadata: "{{ __cred_input_src_item.metadata | default(( {} if controller_configuration_credential_input_sources_enforce_defaults else omit), true) }}" + description: "{{ __cred_input_src_item.description | default(('' if controller_configuration_credential_input_sources_enforce_defaults else omit), true) }}" + metadata: "{{ __cred_input_src_item.metadata | default(({} if controller_configuration_credential_input_sources_enforce_defaults else omit), true) }}" state: "{{ __cred_input_src_item.state | default(controller_state | default('present')) }}" # Role specific options diff --git a/roles/credential_types/tasks/main.yml b/roles/credential_types/tasks/main.yml index 31174461e..53535c4d1 100644 --- a/roles/credential_types/tasks/main.yml +++ b/roles/credential_types/tasks/main.yml @@ -3,9 +3,9 @@ credential_type: name: "{{ __controller_credential_type_item.name | mandatory }}" new_name: "{{ __controller_credential_type_item.new_name | default(omit, true) }}" - description: "{{ __controller_credential_type_item.description | default(( '' if controller_configuration_credential_types_enforce_defaults else omit), true) }}" - injectors: "{{ __controller_credential_type_item.injectors | default(( {} if controller_configuration_credential_types_enforce_defaults else omit), true) | regex_replace('[ ]{2,}', '') }}" - inputs: "{{ __controller_credential_type_item.inputs | default(( {} if controller_configuration_credential_types_enforce_defaults else omit), true) }}" + description: "{{ __controller_credential_type_item.description | default(('' if controller_configuration_credential_types_enforce_defaults else omit), true) }}" + injectors: "{{ __controller_credential_type_item.injectors | default(({} if controller_configuration_credential_types_enforce_defaults else omit), true) | regex_replace('[ ]{2,}', '') }}" + inputs: "{{ __controller_credential_type_item.inputs | default(({} if controller_configuration_credential_types_enforce_defaults else omit), true) }}" kind: "{{ __controller_credential_type_item.kind | default('cloud') }}" state: "{{ __controller_credential_type_item.state | default(controller_state | default('present')) }}" diff --git a/roles/credentials/tasks/main.yml b/roles/credentials/tasks/main.yml index 576997301..108fc691d 100644 --- a/roles/credentials/tasks/main.yml +++ b/roles/credentials/tasks/main.yml @@ -4,13 +4,13 @@ name: "{{ __controller_credentials_item.name | mandatory }}" new_name: "{{ __controller_credentials_item.new_name | default(omit, true) }}" copy_from: "{{ __controller_credentials_item.copy_from | default(omit, true) }}" - description: "{{ __controller_credentials_item.description | default(( '' if controller_configuration_credentials_enforce_defaults else omit), true) }}" - organization: "{{ __controller_credentials_item.organization.name | default(__controller_credentials_item.organization | default(( '' if controller_configuration_credentials_enforce_defaults else omit), true)) }}" + description: "{{ __controller_credentials_item.description | default(('' if controller_configuration_credentials_enforce_defaults else omit), true) }}" + organization: "{{ __controller_credentials_item.organization.name | default(__controller_credentials_item.organization | default(('' if controller_configuration_credentials_enforce_defaults else omit), true)) }}" credential_type: "{{ __controller_credentials_item.credential_type.name | default(__controller_credentials_item.credential_type | mandatory ) }}" - inputs: "{{ __controller_credentials_item.inputs | default(( {} if controller_configuration_credentials_enforce_defaults else omit), true) }}" - user: "{{ __controller_credentials_item.user.username | default(__controller_credentials_item.user | default(( '' if controller_configuration_credentials_enforce_defaults else omit), true)) }}" - team: "{{ __controller_credentials_item.team.name | default(__controller_credentials_item.team | default(( '' if controller_configuration_credentials_enforce_defaults else omit), true)) }}" - update_secrets: "{{ __controller_credentials_item.update_secrets | default( true if controller_configuration_credentials_enforce_defaults else omit) }}" + inputs: "{{ __controller_credentials_item.inputs | default(({} if controller_configuration_credentials_enforce_defaults else omit), true) }}" + user: "{{ __controller_credentials_item.user.username | default(__controller_credentials_item.user | default(('' if controller_configuration_credentials_enforce_defaults else omit), true)) }}" + team: "{{ __controller_credentials_item.team.name | default(__controller_credentials_item.team | default(('' if controller_configuration_credentials_enforce_defaults else omit), true)) }}" + update_secrets: "{{ __controller_credentials_item.update_secrets | default(true if controller_configuration_credentials_enforce_defaults else omit) }}" state: "{{ __controller_credentials_item.state | default(controller_state | default('present')) }}" # Role specific options diff --git a/roles/filetree_create/tasks/users.yml b/roles/filetree_create/tasks/users.yml index 24e599457..26d6bd538 100644 --- a/roles/filetree_create/tasks/users.yml +++ b/roles/filetree_create/tasks/users.yml @@ -22,10 +22,6 @@ label: "User {{ user_lookvar_item.username }}" no_log: "{{ controller_configuration_filetree_create_secure_logging }}" -- name: "DEBUG DEBUG DEBUG" - debug: - var: current_users - - name: "Create the output directory for users in {{ output_path }}" ansible.builtin.file: path: "{{ __path }}"