Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-m-sullivan committed Sep 22, 2022
1 parent 152ed0c commit c9039a6
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 102 deletions.
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/credential_types.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
- name: "Get current Credential Types from the API when AAP"
set_fact:
<<<<<<< HEAD
credential_types_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/credential_types/',
credential_types_lookvar: "{{ query(controller_api_plugin, 'api/v2/credential_types/',
query_params={ 'managed': false },
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
credential_types_lookvar: "{{ query(controller_api_plugin, 'api/v2/credential_types/', query_params={ 'managed': false }, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba
when: is_aap

- name: "Get current Credential Types from the API when Tower"
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/credentials.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
- name: "Get current Credentials from the API"
set_fact:
<<<<<<< HEAD
credentials_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/credentials/',
credentials_lookvar: "{{ query(controller_api_plugin, 'api/v2/credentials/',
query_params={'order_by': 'organization,id'},
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
credentials_lookvar: "{{ query(controller_api_plugin, 'api/v2/credentials/', query_params={'order_by': 'organization'}, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for credentials: {{ output_path }}/<ORGANIZATION_NAME>/credentials"
file:
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/execution_environments.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
- name: "Get current Execution Environments from the API"
set_fact:
<<<<<<< HEAD
execution_environments_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/execution_environments/',
execution_environments_lookvar: "{{ query(controller_api_plugin, 'api/v2/execution_environments/',
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
execution_environments_lookvar: "{{ query(controller_api_plugin, 'api/v2/execution_environments/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for execution environments: {{ output_path }}"
file:
Expand Down
36 changes: 1 addition & 35 deletions roles/filetree_create/tasks/inventory.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
- name: "Get the inventoryes from the API"
set_fact:
<<<<<<< HEAD
inventory_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/inventories/',
inventory_lookvar: "{{ query(controller_api_plugin, 'api/v2/inventories/',
query_params={
'not__kind': 'smart',
'order_by': 'organization,id'
Expand All @@ -13,39 +12,6 @@
}}"

- name: "Create the output directory for inventories: {{ output_path }}/<ORGANIZATION_NAME>/inventories"
=======
inventory_lookvar: "{{ query(controller_api_plugin, 'api/v2/inventories/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects, query_params={
'not__kind': 'smart',
'order_by': 'organization'
}
)
}}"

- name: "Translate the inventories to a useful structure"
set_fact:
current_inventories: "{{ (current_inventories | default({})) | combine({(inventory_lookvar_item_organization | default('ORGANIZATIONLESS', true)): (current_inventories[inventory_lookvar_item_organization] | default([])) + [{
'has_inventory_sources': inventory_lookvar_item.has_inventory_sources,
'id': inventory_lookvar_item.id,
'name': inventory_lookvar_item.name,
'description': inventory_lookvar_item.description,
'organization': inventory_lookvar_item_organization,
'host_filter': inventory_lookvar_item.host_filter,
'kind': inventory_lookvar_item.kind,
'variables': inventory_lookvar_item.variables,
'inventory_sources': query(controller_api_plugin, inventory_lookvar_item.related.inventory_sources, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) if inventory_lookvar_item.has_inventory_sources else [],
'hosts': query(controller_api_plugin, inventory_lookvar_item.related.hosts, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) if not inventory_lookvar_item.has_inventory_sources else [],
'groups': query(controller_api_plugin, inventory_lookvar_item.related.groups, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) if not inventory_lookvar_item.has_inventory_sources else []
}]}) }}"
needed_paths: "{{ ((needed_paths | default([])) + [inventory_lookvar_item_organization]) | flatten | unique }}"
vars:
inventory_lookvar_item_organization: "{{ lookup(controller_api_plugin, 'api/v2/organizations/'+(inventory_lookvar_item.organization|string), host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true)['name'] }}"
loop: "{{ inventory_lookvar }}"
loop_control:
loop_var: inventory_lookvar_item
label: "{{ inventory_lookvar_item_organization }} - {{ inventory_lookvar_item.name }}"

- name: "Create the output directory for inventories: {{ output_path }}/<ORGANIZATION_NAME>"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba
file:
path: "{{ output_path }}/{{ inventory_organization }}/inventories/{{ inventory_name }}"
state: directory
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/job_templates.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
- name: "Get current Job Templates from the API"
set_fact:
<<<<<<< HEAD
job_templates_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/job_templates/',
job_templates_lookvar: "{{ query(controller_api_plugin, 'api/v2/job_templates/',
query_params={'order_by': 'organization,id'},
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
job_templates_lookvar: "{{ query(controller_api_plugin, 'api/v2/job_templates/', query_params={'order_by': 'organization'}, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directories for job templates: {{ output_path }}/<ORGANIZATION_NAME>"
file:
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/notification_templates.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
- name: "Get current Notification Templates from the API"
set_fact:
<<<<<<< HEAD
notification_templates_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/notification_templates/',
notification_templates_lookvar: "{{ query(controller_api_plugin, 'api/v2/notification_templates/',
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
notification_templates_lookvar: "{{ query(controller_api_plugin, 'api/v2/notification_templates/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for notification templates: {{ output_path }}/<ORGANIZATION_NAME>/notification_templates"
file:
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/organizations.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
- name: "Get current Organizations from the API"
set_fact:
<<<<<<< HEAD
orgs_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/organizations/',
orgs_lookvar: "{{ query(controller_api_plugin, 'api/v2/organizations/',
query_params={'order_by': 'id'},
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
orgs_lookvar: "{{ query(controller_api_plugin, 'api/v2/organizations/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for organizations: {{ output_path }}/{{ current_organization_dir.name }}"
file:
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/projects.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
- name: "Get current Projects from the API"
set_fact:
<<<<<<< HEAD
projects_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/projects/',
projects_lookvar: "{{ query(controller_api_plugin, 'api/v2/projects/',
query_params={'order_by': 'organization,id'},
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
projects_lookvar: "{{ query(controller_api_plugin, 'api/v2/projects/', query_params={'order_by': 'organization'}, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for projects: {{ output_path }}/<ORGANIZATION_NAME>/projects"
file:
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/team_roles.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
- name: "Get current Team Roles from the API"
set_fact:
<<<<<<< HEAD
team_roles_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/teams/' + teamid +'/roles/',
team_roles_lookvar: "{{ query(controller_api_plugin, 'api/v2/teams/' + teamid +'/roles/',
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
team_roles_lookvar: "{{ query(controller_api_plugin, 'api/v2/teams/' + teamid +'/roles/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for team roles: {{ output_path }}"
file:
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/teams.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
- name: "Get current Teams from the API"
set_fact:
<<<<<<< HEAD
teams_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/teams/',
teams_lookvar: "{{ query(controller_api_plugin, 'api/v2/teams/',
query_params={'order_by': 'organization,id'},
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
teams_lookvar: "{{ query(controller_api_plugin, 'api/v2/teams/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for teams: {{ output_path }}/<ORGANIZATION_NAME>/teams"
file:
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/user_roles.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
- name: "Get current Users from the API"
set_fact:
<<<<<<< HEAD
user_roles_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/users/' + (username|urlencode()) +'/roles/',
user_roles_lookvar: "{{ query(controller_api_plugin, 'api/v2/users/' + (username|urlencode()) +'/roles/',
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
user_roles_lookvar: "{{ query(controller_api_plugin, 'api/v2/users/' + username +'/roles/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for user roles: {{ output_path }}"
file:
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/users.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
- name: "Get current Users from the API"
set_fact:
<<<<<<< HEAD
users_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/users/',
users_lookvar: "{{ query(controller_api_plugin, 'api/v2/users/',
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
users_lookvar: "{{ query(controller_api_plugin, 'api/v2/users/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Add the users the Organizations information"
set_fact:
Expand Down
9 changes: 2 additions & 7 deletions roles/filetree_create/tasks/workflow_job_template_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,14 @@
}}"
needed_paths: "{{ ((needed_paths | default([])) + [(workflow_job_template_organization|regex_replace('/','_'))]) | flatten | unique }}"
vars:
<<<<<<< HEAD
workflow_job_template_organization: "{{ query('ansible.controller.controller_api', wfjtn_lookvar_item.related.workflow_job_template,
workflow_job_template_organization: "{{ query(controller_api_plugin, wfjtn_lookvar_item.related.workflow_job_template,
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs
)[0].summary_fields.organization.name | default('ORGANIZATIONLESS')
}}"
loop: "{{ query('ansible.controller.controller_api', 'api/v2/workflow_job_template_nodes/',
loop: "{{ query(controller_api_plugin, 'api/v2/workflow_job_template_nodes/',
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
workflow_job_template_organization: "{{ query(controller_api_plugin, wfjtn_lookvar_item.related.workflow_job_template, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs)[0].summary_fields.organization.name | default('ORGANIZATIONLESS') }}"
loop: "{{ query(controller_api_plugin, 'api/v2/workflow_job_template_nodes/', host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba
loop_control:
loop_var: wfjtn_lookvar_item
label: "{{ workflow_job_template_organization + ' - ' + wfjtn_lookvar_item.summary_fields.workflow_job_template.name }}"
Expand Down
6 changes: 1 addition & 5 deletions roles/filetree_create/tasks/workflow_job_templates.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
- name: "Get current Workflow Job Templates from the API"
set_fact:
<<<<<<< HEAD
workflow_job_templates_lookvar: "{{ query('ansible.controller.controller_api', 'api/v2/workflow_job_templates/',
workflow_job_templates_lookvar: "{{ query(controller_api_plugin, 'api/v2/workflow_job_templates/',
query_params={'order_by': 'organization,id'},
host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs,
return_all=true, max_objects=query_controller_api_max_objects)
}}"
=======
workflow_job_templates_lookvar: "{{ query(controller_api_plugin, 'api/v2/workflow_job_templates/', query_params={'order_by': 'organization'}, host=controller_hostname, oauth_token=oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}"
>>>>>>> c1a1936227ebf5173ab8bd205b809de44bc653ba

- name: "Create the output directory for workflow job templates: {{ output_path }}/<ORGANIZATION_NAME>/workflow_job_templates"
file:
Expand Down

0 comments on commit c9039a6

Please sign in to comment.