Skip to content

Commit

Permalink
Parametrize async and poll to tune them as per need (#264)
Browse files Browse the repository at this point in the history
* Updated tasks and default to parametrize async and poll to respect long running backup for AAP2.4+ with private automation hub

* Added changelog fragment file

---------

Co-authored-by: David Danielsson <[email protected]>
  • Loading branch information
myselfgagandeep and djdanielsson authored Jan 10, 2025
1 parent f5482b5 commit 84df647
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/aap_backup_task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- aap_backup - Updated tasks and default to parametrize async and poll to respect long running backup for AAP2.4+ with private automation hub
2 changes: 2 additions & 0 deletions roles/aap_backup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Available variables are listed below, along with default values defined (see def
```yaml
aap_setup_prep_setup_dir: # Must be set, though if the aap_setup_prepare role has been run prior, a fact will be set.
aap_backup_dest: "/root"
aap_backup_async: 10000
aap_backup_poll: 20
```
## Example Playbook
Expand Down
2 changes: 2 additions & 0 deletions roles/aap_backup/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@

# Default backup vars, these are default from installer
aap_backup_dest: /var/tmp
aap_backup_async: 10000
aap_backup_poll: 20
...
4 changes: 2 additions & 2 deletions roles/aap_backup/tasks/backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ansible.builtin.command: ./setup.sh -e 'backup_dest={{ aap_backup_dest | quote }}' -b
args:
chdir: "{{ aap_setup_prep_setup_dir }}"
async: 10000
poll: 20
async: "{{ aap_backup_async }}"
poll: "{{ aap_backup_poll }}"
changed_when: false # these will always run and will always report "changed" otherwise
...

0 comments on commit 84df647

Please sign in to comment.