Skip to content

Commit

Permalink
Add to content_view_version versions asynchronical with a poll interval
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxonfire authored Oct 24, 2023
1 parent 2cbde93 commit 4998177
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/1676-content_view_version-async-poll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- content_view_publish role - allow passing ``async`` and ``poll`` to the module (https://github.com/theforeman/foreman-ansible-modules/pull/1676)
5 changes: 5 additions & 0 deletions roles/content_view_publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ This role supports the [Common Role Variables](https://github.com/theforeman/for

- `foreman_content_views`: List of Content Views to publish. It can be either a list of Content View names or a list of dictionaries with the parameters as accepted by the `content_view_version` module or the `content_views` role.

### Optional

- `foreman_content_view_publish_async`: Asynchronous mode lets you control how long-running tasks execute. See the [Ansible documentation](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_async.html#asynchronous-playbook-tasks) for details.
- `foreman_content_view_publish_poll`: For asynchronous tasks, this is how often to check back on the status of those tasks.

Example Playbook
----------------

Expand Down
2 changes: 2 additions & 0 deletions roles/content_view_publish/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
force_promote: "{{ content_view.force_promote | default(omit) }}"
force_yum_metadata_regeneration: "{{ content_view.force_yum_metadata_regeneration | default(omit) }}"
current_lifecycle_environment: "{{ content_view.current_lifecycle_environment | default(omit) }}"
async: "{{ foreman_content_view_publish_async | default(omit) }}"
poll: "{{ foreman_content_view_publish_poll | default(omit) }}"
loop: "{{ foreman_content_views }}"
loop_control:
loop_var: "content_view"

0 comments on commit 4998177

Please sign in to comment.