Skip to content

Commit 7ed6f1b

Browse files
authored
adding sync option to collection_repo_sync (#1172)
1 parent 8e0c0c8 commit 7ed6f1b

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
minor_changes:
3+
- added a sync option to collection_repository_sync role to allow more easily skipping of specific repositories
4+
...

roles/controller_workflow_job_templates/tasks/add_workflows_schema.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@
9696
label: "{{ __workflow_loop_node_item.identifier }}"
9797
# Execute only the nodes that define links to the following
9898
when: ((__workflow_loop_node_item.always_nodes is defined and __workflow_loop_node_item.always_nodes | length > 0) or (__workflow_loop_node_item.success_nodes is
99-
defined and __workflow_loop_node_item.success_nodes | length > 0) or (__workflow_loop_node_item.failure_nodes is defined and __workflow_loop_node_item.failure_nodes
100-
| length > 0))
99+
defined and __workflow_loop_node_item.success_nodes | length > 0) or (__workflow_loop_node_item.failure_nodes is defined and __workflow_loop_node_item.failure_nodes | length > 0))
101100
async: "{{ ansible_check_mode | ternary(0, 1000) }}"
102101
poll: 0
103102
register: __workflows_link_async

roles/hub_collection_repository_sync/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ This also speeds up the overall role.
6060
|`name`|""|yes|str| Collection Repository name. Probably one of community, validated, rh-certified, or one you have created.|
6161
|`wait`|`true`|no|bool|Wait for the Collection repository to finish syncing before returning.|
6262
|`interval`|1.0|no|float|The interval to request an update from Automation Hub.|
63+
|`sync`|true|no|bool|Whether to sync the collection_registry. By default it will sync unless this is set to false.|
6364
|`timeout`|""|no|int|If waiting for the repository to update this will abort after this amount of seconds.|
6465
|`state`|`present`|no|str|Desired state of the collection repository. Either `present` or `absent`.|
6566

roles/hub_collection_repository_sync/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
loop_var: __hub_collection_repository_sync_item
2323
label: "{{ __operation.verb }} the sync {{ __hub_collection_repository_sync_item.name }} in Hub"
2424
pause: "{{ hub_configuration_collection_repository_sync_loop_delay }}"
25+
when: __hub_collection_repository_sync_item.sync | default(true)
2526
async: "{{ hub_configuration_collection_repository_sync_async_timeout }}"
2627
poll: 0
2728
register: __collection_repository_sync_job_async

0 commit comments

Comments
 (0)