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

Add to content_view_version versions asynchronical with a poll interval #1676

Merged
merged 5 commits into from
Oct 24, 2023
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
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"
Loading