Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding pause loop feature #844

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/pause_loop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
minor_changes:
- Added `controller_configuration_loop_delay` and role specific var to give users the option to add a pause during the async loop to slow it down a bit when they are seeing controller API overloaded.
...
2 changes: 2 additions & 0 deletions roles/applications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ This also speeds up the overall role.
|`controller_configuration_applications_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_applications_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_applications_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

## Data Structure
Expand Down
1 change: 1 addition & 0 deletions roles/applications/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ controller_applications: []
controller_configuration_applications_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_applications_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_applications_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_applications_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
controller_configuration_async_dir: null
controller_configuration_applications_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
...
1 change: 1 addition & 0 deletions roles/applications/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
loop_control:
loop_var: "__application_item"
label: "{{ __operation.verb }} Controller Application {{ __application_item.name }}"
pause: "{{ controller_configuration_applications_loop_delay }}"
no_log: "{{ controller_configuration_applications_secure_logging }}"
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
poll: 0
Expand Down
2 changes: 2 additions & 0 deletions roles/bulk_host_create/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ This also speeds up the overall role.
|`controller_configuration_bulk_hosts_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_bulk_hosts_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_bulk_hosts_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

## Data Structure
Expand Down
1 change: 1 addition & 0 deletions roles/bulk_host_create/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
controller_configuration_bulk_hosts_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_bulk_hosts_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_bulk_hosts_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_bulk_hosts_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
controller_configuration_async_dir: null
...
1 change: 1 addition & 0 deletions roles/bulk_host_create/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
loop: "{{ controller_bulk_hosts }}"
loop_control:
loop_var: __controller_bulk_hosts_item
pause: "{{ controller_configuration_bulk_hosts_loop_delay }}"
no_log: "{{ controller_configuration_bulk_hosts_secure_logging }}"
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
poll: 0
Expand Down
2 changes: 2 additions & 0 deletions roles/bulk_job_launch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ This also speeds up the overall role.
|`controller_configuration_bulk_job_launch_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_bulk_job_launch_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_bulk_job_launch_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|

## Data Structure

Expand Down
1 change: 1 addition & 0 deletions roles/bulk_job_launch/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
controller_configuration_bulk_job_launch_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_bulk_job_launch_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_bulk_job_launch_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_bulk_job_launch_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
...
1 change: 1 addition & 0 deletions roles/bulk_job_launch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
loop_control:
loop_var: "__bulk_job_launch_item"
label: "{{ (__bulk_job_launch_item.organization | default('<no_org>')) }}/{{ __bulk_job_launch_item.name }}"
pause: "{{ controller_configuration_bulk_job_launch_loop_delay }}"
no_log: "{{ controller_configuration_bulk_job_launch_secure_logging }}"
register: bulk_launched_controller_jobs
when: controller_bulk_launch_jobs is defined
Expand Down
2 changes: 2 additions & 0 deletions roles/credential_input_sources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ This also speeds up the overall role.
|`controller_configuration_credential_input_sources_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_credential_input_sources_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_credential_input_sources_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

## Data Structure
Expand Down
1 change: 1 addition & 0 deletions roles/credential_input_sources/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ controller_credential_input_sources: []
controller_configuration_credential_input_sources_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_credential_input_sources_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_credential_input_sources_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_credential_input_sources_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
controller_configuration_async_dir: null
controller_configuration_credential_input_sources_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
...
1 change: 1 addition & 0 deletions roles/credential_input_sources/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
loop_control:
loop_var: "__cred_input_src_item"
label: "{{ __operation.verb }} Controller Credential Input Source for Credential {{ __cred_input_src_item.target_credential }}"
pause: "{{ controller_configuration_credential_input_sources_loop_delay }}"
no_log: "{{ controller_configuration_credential_input_sources_secure_logging }}"
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
poll: 0
Expand Down
2 changes: 2 additions & 0 deletions roles/credential_types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ This also speeds up the overall role.
|`controller_configuration_credential_types_async_retries`|`controller_configuration_async_retries`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_credential_types_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_credential_types_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

## Data Structure
Expand Down
1 change: 1 addition & 0 deletions roles/credential_types/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ controller_credential_types: []
controller_configuration_credential_types_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_credential_types_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_credential_types_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_credential_types_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
controller_configuration_async_dir: null
controller_configuration_credential_types_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
...
1 change: 1 addition & 0 deletions roles/credential_types/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
loop_control:
loop_var: __controller_credential_type_item
label: "{{ __operation.verb }} Credential Type {{ __controller_credential_type_item.name }}"
pause: "{{ controller_configuration_credential_types_loop_delay }}"
no_log: "{{ controller_configuration_credential_types_secure_logging }}"
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
poll: 0
Expand Down
2 changes: 2 additions & 0 deletions roles/credentials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ This also speeds up the overall role.
|`controller_configuration_credentials_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_credentials_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_credentials_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

## Data Structure
Expand Down
1 change: 1 addition & 0 deletions roles/credentials/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ controller_credentials: []
controller_configuration_credentials_secure_logging: "{{ controller_configuration_secure_logging | default(true) }}"
controller_configuration_credentials_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_credentials_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_credentials_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
controller_configuration_async_dir: null
controller_configuration_credentials_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
...
1 change: 1 addition & 0 deletions roles/credentials/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
loop_control:
loop_var: __controller_credentials_item
label: "{{ __operation.verb }} Credential {{ __controller_credentials_item.name }}"
pause: "{{ controller_configuration_credentials_loop_delay }}"
no_log: "{{ controller_configuration_credentials_secure_logging }}"
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
poll: 0
Expand Down
2 changes: 2 additions & 0 deletions roles/execution_environments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ This also speeds up the overall role.
|`controller_configuration_execution_environments_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_execution_environments_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_execution_environments_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

## Data Structure
Expand Down
1 change: 1 addition & 0 deletions roles/execution_environments/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
controller_configuration_execution_environments_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_execution_environments_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_execution_environments_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_execution_environments_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
controller_configuration_async_dir: null
controller_configuration_execution_environments_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
...
1 change: 1 addition & 0 deletions roles/execution_environments/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
loop_control:
loop_var: "__execution_environments_item"
label: "{{ __operation.verb }} Controller Execution Environment {{ __execution_environments_item }}"
pause: "{{ controller_configuration_execution_environments_loop_delay }}"
no_log: "{{ controller_configuration_execution_environments_secure_logging }}"
when: controller_execution_environments is defined
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
Expand Down
2 changes: 2 additions & 0 deletions roles/groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ This also speeds up the overall role.
|`controller_configuration_groups_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_groups_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_group_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

### Formating Variables
Expand Down
1 change: 1 addition & 0 deletions roles/groups/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ controller_groups: []
controller_configuration_group_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_group_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_group_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_group_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
controller_configuration_async_dir: null
controller_configuration_groups_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
...
1 change: 1 addition & 0 deletions roles/groups/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
loop_control:
loop_var: __controller_groups_item
label: "{{ __operation.verb }} Controller Group {{ __controller_groups_item.name }}"
pause: "{{ controller_configuration_group_loop_delay }}"
no_log: "{{ controller_configuration_group_secure_logging }}"
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
poll: 0
Expand Down
2 changes: 2 additions & 0 deletions roles/hosts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ This also speeds up the overall role.
|`controller_configuration_host_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_host_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_hosts_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

### Formating Variables
Expand Down
1 change: 1 addition & 0 deletions roles/hosts/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ controller_hosts: []
controller_configuration_hosts_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}"
controller_configuration_hosts_async_retries: "{{ controller_configuration_async_retries | default(30) }}"
controller_configuration_hosts_async_delay: "{{ controller_configuration_async_delay | default(1) }}"
controller_configuration_hosts_loop_delay: "{{ controller_configuration_loop_delay | default(0) }}"
controller_configuration_async_dir: null
controller_configuration_host_enforce_defaults: "{{ controller_configuration_enforce_defaults | default(false) }}"
...
1 change: 1 addition & 0 deletions roles/hosts/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
loop_control:
loop_var: __controller_host_item
label: "{{ __operation.verb }} Controller host {{ __controller_host_item.name }}"
pause: "{{ controller_configuration_hosts_loop_delay }}"
no_log: "{{ controller_configuration_hosts_secure_logging }}"
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
poll: 0
Expand Down
2 changes: 2 additions & 0 deletions roles/instance_groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ This also speeds up the overall role.
|`controller_configuration_instance_groups_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.|
|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.|
|`controller_configuration_instance_groups_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.|
|`controller_configuration_loop_delay`|0|no|This sets the pause between each item in the loop for the roles globally. To help when API is getting overloaded.|
|`controller_configuration_instance_groups_loop_delay`|`controller_configuration_loop_delay`|no|This sets the pause between each item in the loop for the role. To help when API is getting overloaded.|
|`controller_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|

## Data Structure
Expand Down
Loading
Loading