Skip to content

Commit

Permalink
Cleanup for linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dbk-rabel committed Oct 26, 2023
1 parent e5e58ba commit 71c921b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
1 change: 0 additions & 1 deletion plugins/lookup/controller_object_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
name: infra.controller_configuration.projects
vars:
controller_projects: "{{ project_difference }}"

Check failure on line 78 in plugins/lookup/controller_object_diff.py

View workflow job for this annotation

GitHub Actions / pre-commit_and_sanity / pre-commit / pre-commit

yaml[document-end]

Missing document end "..."
"""

RETURN = """
Expand Down
3 changes: 1 addition & 2 deletions plugins/modules/controller_export_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@


DOCUMENTATION = """
---
module: controller_export_diff
author: "Sean Sullivan (@sean-m-sullivan)"
short_description: Compare controller configuration resources with those defined in code.
Expand Down Expand Up @@ -192,7 +191,7 @@
scm_url: https://github.com/ansible/ansible-examples.git
description: ansible-examples
organization:
name: Satellite
name: Satellite
credential: gitlab-personal-access-token for satqe_auto_droid
wait: false
controller_host: https://controller
Expand Down
2 changes: 1 addition & 1 deletion roles/credentials/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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)) }}"
credential_type: "{{ __controller_credentials_item.credential_type.name | default(__controller_credentials_item.credential_type | mandatory ) }}"
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)) }}"
Expand Down
8 changes: 4 additions & 4 deletions roles/execution_environments/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
execution_environment:
name: "{{ __execution_environments_item.name | mandatory }}"

Check failure on line 5 in roles/execution_environments/tasks/main.yml

View workflow job for this annotation

GitHub Actions / pre-commit_and_sanity / pre-commit / pre-commit

jinja[invalid]

template error while templating string: unexpected '}'. String: {{ __execution_environments_item.description | default(('' if controller_configuration_execution_environments_enforce_defaults else omit), true) }. unexpected '}'
new_name: "{{ __execution_environments_item.new_name | default(omit, true) }}"
description: "{{ __execution_environments_item.description | default(( '' if controller_configuration_execution_environments_enforce_defaults else omit), true) }}"
description: "{{ __execution_environments_item.description | default(('' if controller_configuration_execution_environments_enforce_defaults else omit), true) }"
image: "{{ __execution_environments_item.image | mandatory }}"
organization: "{{ __execution_environments_item.organization.name | default(__execution_environments_item.organization | default(( '' if controller_configuration_execution_environments_enforce_defaults else omit), true)) }}"
credential: "{{ __execution_environments_item.credential | default(( '' if controller_configuration_execution_environments_enforce_defaults else omit), true) }}"
pull: "{{ __execution_environments_item.pull | default(( 'missing' if controller_configuration_execution_environments_enforce_defaults else omit), true) }}"
organization: "{{ __execution_environments_item.organization.name | default(__execution_environments_item.organization | default(('' if controller_configuration_execution_environments_enforce_defaults else omit), true)) }}"
credential: "{{ __execution_environments_item.credential | default(('' if controller_configuration_execution_environments_enforce_defaults else omit), true) }}"
pull: "{{ __execution_environments_item.pull | default(('missing' if controller_configuration_execution_environments_enforce_defaults else omit), true) }}"
state: "{{ __execution_environments_item.state | default(controller_state | default('present')) }}"

# Role specific options
Expand Down
10 changes: 5 additions & 5 deletions roles/groups/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
group:
name: "{{ controller_groups_item.name | mandatory }}"

Check warning on line 6 in roles/groups/tasks/main.yml

View workflow job for this annotation

GitHub Actions / pre-commit_and_sanity / pre-commit / pre-commit

jinja[spacing]

Jinja2 spacing could be improved: {{ controller_groups_item.variables | default(( {} if controller_configuration_groups_enforce_defaults else omit), true) | regex_replace('[ ]{2,}', '') }} -> {{ controller_groups_item.variables | default(({} if controller_configuration_groups_enforce_defaults else omit), true) | regex_replace('[ ]{2,}', '') }}
new_name: "{{ controller_groups_item.new_name | default(omit, true) }}"
description: "{{ controller_groups_item.description | default(( '' if controller_configuration_groups_enforce_defaults else omit), true) }}"
description: "{{ controller_groups_item.description | default(('' if controller_configuration_groups_enforce_defaults else omit), true) }}"
inventory: "{{ controller_groups_item.inventory | mandatory }}"
variables: "{{ controller_groups_item.variables | default(( {} if controller_configuration_groups_enforce_defaults else omit), true) | regex_replace('[ ]{2,}', '') }}"
hosts: "{{ controller_groups_item.hosts | default(( [] if controller_configuration_groups_enforce_defaults else omit), true) }}"
children: "{{ controller_groups_item.children | default(( [] if controller_configuration_groups_enforce_defaults else omit), true) }}"
preserve_existing_hosts: "{{ controller_groups_item.preserve_existing_hosts | default(( false if controller_configuration_groups_enforce_defaults else omit)) }}"
preserve_existing_children: "{{ controller_groups_item.preserve_existing_children | default(( false if controller_configuration_groups_enforce_defaults else omit)) }}"
hosts: "{{ controller_groups_item.hosts | default(([] if controller_configuration_groups_enforce_defaults else omit), true) }}"
children: "{{ controller_groups_item.children | default(([] if controller_configuration_groups_enforce_defaults else omit), true) }}"
preserve_existing_hosts: "{{ controller_groups_item.preserve_existing_hosts | default((false if controller_configuration_groups_enforce_defaults else omit)) }}"
preserve_existing_children: "{{ controller_groups_item.preserve_existing_children | default((false if controller_configuration_groups_enforce_defaults else omit)) }}"
state: "{{ controller_groups_item.state | default(controller_state | default('present')) }}"

# Role Standard Options
Expand Down

0 comments on commit 71c921b

Please sign in to comment.