mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03:30
fqcn redirects, and raise from sanity test fix
This commit is contained in:
@@ -38,6 +38,7 @@ plugin_routing:
|
|||||||
tower_schedule_rrule:
|
tower_schedule_rrule:
|
||||||
redirect: awx.awx.schedule_rrule
|
redirect: awx.awx.schedule_rrule
|
||||||
modules:
|
modules:
|
||||||
|
# if playbook does not specify a FQCN
|
||||||
tower_ad_hoc_command_cancel:
|
tower_ad_hoc_command_cancel:
|
||||||
redirect: awx.awx.ad_hoc_command_cancel
|
redirect: awx.awx.ad_hoc_command_cancel
|
||||||
tower_ad_hoc_command_wait:
|
tower_ad_hoc_command_wait:
|
||||||
@@ -118,3 +119,84 @@ plugin_routing:
|
|||||||
redirect: awx.awx.workflow_launch
|
redirect: awx.awx.workflow_launch
|
||||||
tower_workflow_node_wait:
|
tower_workflow_node_wait:
|
||||||
redirect: awx.awx.workflow_node_wait
|
redirect: awx.awx.workflow_node_wait
|
||||||
|
# if playbook specifies a FQCN
|
||||||
|
awx.awx.tower_ad_hoc_command_cancel:
|
||||||
|
redirect: awx.awx.ad_hoc_command_cancel
|
||||||
|
awx.awx.tower_ad_hoc_command_wait:
|
||||||
|
redirect: awx.awx.ad_hoc_command_wait
|
||||||
|
awx.awx.tower_ad_hoc_command:
|
||||||
|
redirect: awx.awx.ad_hoc_command
|
||||||
|
awx.awx.tower_application:
|
||||||
|
redirect: awx.awx.application
|
||||||
|
awx.awx.tower_meta:
|
||||||
|
redirect: awx.awx.controller_meta
|
||||||
|
awx.awx.tower_credential_input_source:
|
||||||
|
redirect: awx.awx.credential_input_source
|
||||||
|
awx.awx.tower_credential_type:
|
||||||
|
redirect: awx.awx.credential_type
|
||||||
|
awx.awx.tower_credential:
|
||||||
|
redirect: awx.awx.credential
|
||||||
|
awx.awx.tower_execution_environment:
|
||||||
|
redirect: awx.awx.execution_environment
|
||||||
|
awx.awx.tower_export:
|
||||||
|
redirect: awx.awx.export
|
||||||
|
awx.awx.tower_group:
|
||||||
|
redirect: awx.awx.group
|
||||||
|
awx.awx.tower_host:
|
||||||
|
redirect: awx.awx.host
|
||||||
|
awx.awx.tower_import:
|
||||||
|
redirect: awx.awx.import
|
||||||
|
awx.awx.tower_instance_group:
|
||||||
|
redirect: awx.awx.instance_group
|
||||||
|
awx.awx.tower_inventory_source_update:
|
||||||
|
redirect: awx.awx.inventory_source_update
|
||||||
|
awx.awx.tower_inventory_source:
|
||||||
|
redirect: awx.awx.inventory_source
|
||||||
|
awx.awx.tower_inventory:
|
||||||
|
redirect: awx.awx.inventory
|
||||||
|
awx.awx.tower_job_cancel:
|
||||||
|
redirect: awx.awx.job_cancel
|
||||||
|
awx.awx.tower_job_launch:
|
||||||
|
redirect: awx.awx.job_launch
|
||||||
|
awx.awx.tower_job_list:
|
||||||
|
redirect: awx.awx.job_list
|
||||||
|
awx.awx.tower_job_template:
|
||||||
|
redirect: awx.awx.job_template
|
||||||
|
awx.awx.tower_job_wait:
|
||||||
|
redirect: awx.awx.job_wait
|
||||||
|
awx.awx.tower_label:
|
||||||
|
redirect: awx.awx.label
|
||||||
|
awx.awx.tower_license:
|
||||||
|
redirect: awx.awx.license
|
||||||
|
awx.awx.tower_notification_template:
|
||||||
|
redirect: awx.awx.notification_template
|
||||||
|
awx.awx.tower_notification:
|
||||||
|
redirect: awx.awx.notification_template
|
||||||
|
awx.awx.tower_organization:
|
||||||
|
redirect: awx.awx.organization
|
||||||
|
awx.awx.tower_project_update:
|
||||||
|
redirect: awx.awx.project_update
|
||||||
|
awx.awx.tower_project:
|
||||||
|
redirect: awx.awx.project
|
||||||
|
awx.awx.tower_role:
|
||||||
|
redirect: awx.awx.role
|
||||||
|
awx.awx.tower_schedule:
|
||||||
|
redirect: awx.awx.schedule
|
||||||
|
awx.awx.tower_settings:
|
||||||
|
redirect: awx.awx.settings
|
||||||
|
awx.awx.tower_team:
|
||||||
|
redirect: awx.awx.team
|
||||||
|
awx.awx.tower_token:
|
||||||
|
redirect: awx.awx.token
|
||||||
|
awx.awx.tower_user:
|
||||||
|
redirect: awx.awx.user
|
||||||
|
awx.awx.tower_workflow_approval:
|
||||||
|
redirect: awx.awx.workflow_approval
|
||||||
|
awx.awx.tower_workflow_job_template_node:
|
||||||
|
redirect: awx.awx.workflow_job_template_node
|
||||||
|
awx.awx.tower_workflow_job_template:
|
||||||
|
redirect: awx.awx.workflow_job_template
|
||||||
|
awx.awx.tower_workflow_launch:
|
||||||
|
redirect: awx.awx.workflow_launch
|
||||||
|
awx.awx.tower_workflow_node_wait:
|
||||||
|
redirect: awx.awx.workflow_node_wait
|
||||||
|
|||||||
@@ -184,8 +184,8 @@ class LookupModule(LookupBase):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
rrule_kwargs['until'] = LookupModule.parse_date_time(end_on)
|
rrule_kwargs['until'] = LookupModule.parse_date_time(end_on)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
raise AnsibleError('Parameter end_on must either be an integer or in the format YYYY-MM-DD [HH:MM:SS]')
|
raise AnsibleError('Parameter end_on must either be an integer or in the format YYYY-MM-DD [HH:MM:SS]') from e
|
||||||
|
|
||||||
# A week-based frequency can also take the on_days parameter
|
# A week-based frequency can also take the on_days parameter
|
||||||
if frequency == 'week' and 'on_days' in kwargs:
|
if frequency == 'week' and 'on_days' in kwargs:
|
||||||
@@ -208,16 +208,16 @@ class LookupModule(LookupBase):
|
|||||||
my_month_day = int(kwargs['month_day_number'])
|
my_month_day = int(kwargs['month_day_number'])
|
||||||
if my_month_day < 1 or my_month_day > 31:
|
if my_month_day < 1 or my_month_day > 31:
|
||||||
raise Exception()
|
raise Exception()
|
||||||
except Exception:
|
except Exception as e:
|
||||||
raise AnsibleError('month_day_number must be between 1 and 31')
|
raise AnsibleError('month_day_number must be between 1 and 31') from e
|
||||||
|
|
||||||
rrule_kwargs['bymonthday'] = my_month_day
|
rrule_kwargs['bymonthday'] = my_month_day
|
||||||
|
|
||||||
if 'on_the' in kwargs:
|
if 'on_the' in kwargs:
|
||||||
try:
|
try:
|
||||||
(occurance, weekday) = kwargs['on_the'].split(' ')
|
(occurance, weekday) = kwargs['on_the'].split(' ')
|
||||||
except Exception:
|
except Exception as e:
|
||||||
raise AnsibleError('on_the parameter must be two words separated by a space')
|
raise AnsibleError('on_the parameter must be two words separated by a space') from e
|
||||||
|
|
||||||
if weekday not in LookupModule.weekdays:
|
if weekday not in LookupModule.weekdays:
|
||||||
raise AnsibleError('Weekday portion of on_the parameter is not valid')
|
raise AnsibleError('Weekday portion of on_the parameter is not valid')
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
- name: Change runtime.yml redirect destinations
|
- name: Change runtime.yml redirect destinations
|
||||||
replace:
|
replace:
|
||||||
path: "{{ collection_path }}/meta/runtime.yml"
|
path: "{{ collection_path }}/meta/runtime.yml"
|
||||||
regexp: "redirect: awx.awx."
|
regexp: "awx.awx."
|
||||||
replace: "redirect: {{ collection_namespace }}.{{ collection_package }}."
|
replace: "{{ collection_namespace }}.{{ collection_package }}."
|
||||||
|
|
||||||
- name: get list of test files
|
- name: get list of test files
|
||||||
find:
|
find:
|
||||||
|
|||||||
Reference in New Issue
Block a user