Skip to content

Commit

Permalink
removed debug information. added ORGANIZATIONLESS to credentials and …
Browse files Browse the repository at this point in the history
…users without an organization
  • Loading branch information
ivarmu committed Jul 28, 2023
1 parent 4109c96 commit 61371d6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
6 changes: 0 additions & 6 deletions roles/dispatch/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
---
- name: "DEBUG"
debug:
var: controller_workflows
tags:
- always

- name: "Run infra.controller_configuration.{{ __role.role }}"
ansible.builtin.include_role:
name: "{{ __role.role }}"
Expand Down
6 changes: 5 additions & 1 deletion roles/filetree_create/tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

- name: "Add the users the Organizations information" # noqa jinja[spacing]
ansible.builtin.set_fact:
current_users: "{{ (current_users | default([])) + [user_lookvar_item | combine({'organizations': user_lookvar_item_organizations})] }}"
current_users: "{{ (current_users | default([])) + [user_lookvar_item | combine({'organizations': user_lookvar_item_organizations if (user_lookvar_item_organizations | length > 1) else ['ORGANIZATIONLESS']})] }}"
vars:
user_lookvar_item_organizations: "{{ query(controller_api_plugin, user_lookvar_item.related.organizations,
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs,
Expand All @@ -22,6 +22,10 @@
label: "User {{ user_lookvar_item.username }}"
no_log: "{{ controller_configuration_filetree_create_secure_logging }}"

- name: "DEBUG DEBUG DEBUG"

Check failure on line 25 in roles/filetree_create/tasks/users.yml

View workflow job for this annotation

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

fqcn[action-core]

Use FQCN for builtin module actions (debug).
debug:
var: current_users

- name: "Create the <ORGANIZATION_NAME> output directory for users in {{ output_path }}"
ansible.builtin.file:
path: "{{ __path }}"
Expand Down
2 changes: 2 additions & 0 deletions roles/filetree_create/templates/current_credentials.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ controller_credentials:
credential_type: "{{ current_credentials_asset_value.summary_fields.credential_type.name }}"
{% if current_credentials_asset_value.organization is defined and current_credentials_asset_value.organization is not none %}
organization: "{{ current_credentials_asset_value.summary_fields.organization.name }}"
{% else %}
organization: "ORGANIZATIONLESS"
{% endif %}
inputs:
{{ current_credentials_asset_value.inputs | to_nice_yaml(indent=2) | indent(width=6, first=True) | replace("$encrypted$", "\'\'") }}
Expand Down
5 changes: 0 additions & 5 deletions roles/filetree_read/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
# tasks file for filetree_read
- debug:
var: controller_roles
when:
controller_roles is defined

- name: "Init controller variables"
ansible.builtin.set_fact:
controller_settings: []
Expand Down
12 changes: 6 additions & 6 deletions roles/object_diff/tasks/execution_environments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
- name: Get the organization ID
ansible.builtin.set_fact:
__controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations',
query_params={'name': orgs},
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs)
query_params={'name': orgs},
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs)
}}"

- name: "Get the API list of all Execution Environments in Organization {{ orgs }}"
ansible.builtin.set_fact:
__controller_api_execution_environments: "{{ query(controller_api_plugin, 'execution_environments',
query_params={'organization': __controller_organization_id.id},
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
query_params={'organization': __controller_organization_id.id},
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"

- name: "Find the difference of Execution Environment between what is on the Controller versus CasC on SCM"
ansible.builtin.set_fact:
Expand Down

0 comments on commit 61371d6

Please sign in to comment.