You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* added option for skip_tags var to omit objects
* documented skip_tags in openshift_applier README
* changed skip_tags to exclude_tags and allowed for use with filter_tags
* fixed newline error
* changed refrences in filter from filter_tags to include_tags
* fixed filter_content function name
* fixed include_list var
* handle overlapping invocation of include_tags and exclude_tags with erroring out
* added newline for ci job
* same as before
* removed blank line
* remove trailing white space
* updated error messages and default filter values
* updated filter error
Copy file name to clipboardExpand all lines: roles/openshift-applier/README.md
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ openshift_cluster_content:
51
51
file: <file source>
52
52
action: <apply|create> # Optional: Defaults to 'apply'
53
53
no_log: <True|False> # Optional: no_log at content level if functionality desired. Defaults to False
54
-
tags: # Optional: Tags are only needed if `include_tags` is used
54
+
tags: # Optional: Tags are only needed if `include_tags` or `exclude_tags` is used
55
55
- tag1
56
56
- tag2
57
57
post_steps: # Optional: post-steps at content level can be added if desired
@@ -212,12 +212,15 @@ metadata:
212
212
213
213
### Filtering content based on tags
214
214
215
-
The `openshift-applier` supports the use of tags in the inventory (see example above) to allow for filtering which content should be processed and not. The `include_tags` variable/fact takes a comma separated list of tags that will be processed and only content with matching tagswill be applied.
215
+
The `openshift-applier` supports the use of tags in the inventory (see example above) to allow for filtering which content should be processed and not. The `include_tags` and `exclude_tags` variables/facts take a comma separated list of tags that will be processed. The `include_tags` will apply content **only** with the matching tags, while `exclude_tags` will apply **anything but** the content with the matching tags.
216
216
217
-
**_NOTE:_** Entries in the inventory without tags will not be processed when a valid list is supplied with the `include_tags` option.
217
+
**_NOTE:_** Entries in the inventory without tags will not be processed when a valid list of tags is supplied with `include_tags`.
218
+
219
+
**_NOTE:_** If the same tag exists in both `include_tags` and `exclude_tags` the run will error out. Likewise, if tags from the two options annuls each other, the execution will also error out.
Copy file name to clipboardExpand all lines: roles/openshift-applier/tasks/error-on-unsupported.yml
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,3 +24,9 @@
24
24
when:
25
25
- unsupported_items is defined
26
26
with_dict: "{{ unsupported_items }}"
27
+
28
+
- name: "Error out if any unsupported tag usage was found"
29
+
fail:
30
+
msg: "Confused - Do not know how to process the combination of tags for content {{ item.object }}/{{ item.name }} and include_tags/exclude_tags parameters."
0 commit comments