From 52c98bc0572c96fd26df5775e52a855589400b0b Mon Sep 17 00:00:00 2001 From: "Patrick C. F. Ernzer" Date: Wed, 28 Feb 2024 22:30:02 +0100 Subject: [PATCH] try to align examples to those of #1709 --- plugins/modules/content_view_filter.py | 32 +++++++++++++++++--------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/plugins/modules/content_view_filter.py b/plugins/modules/content_view_filter.py index 894784f83..1297f8056 100644 --- a/plugins/modules/content_view_filter.py +++ b/plugins/modules/content_view_filter.py @@ -92,29 +92,39 @@ ''' EXAMPLES = ''' -- name: Exclude csh +# as of v4.0.0 you can no longer manage rules from this module, content_view_filter_rule should be used for that +# you still need to ensure the filter itself exists before adding rules to said filter + +- name: Ensure the filter for errata inclusion by date exists theforeman.foreman.content_view_filter: username: "admin" password: "changeme" server_url: "https://foreman.example.com" - name: "package filter 1" organization: "Default Organization" - content_view: Web Servers - filter_type: "rpm" - package_name: tcsh + name: "errata_by_date" + content_view: "Standard Operating Environment" + filter_type: rpm + inclusion: true -- name: Include newer csh versions +- name: Ensure package exclude filter 1 exists theforeman.foreman.content_view_filter: username: "admin" password: "changeme" server_url: "https://foreman.example.com" + organization: "Default Organization" name: "package filter 1" + content_view: "Standard Operating Environment" + filter_type: rpm + +- name: Ensure modulemd filter for 389 exists + theforeman.foreman.content_view_filter: + username: "admin" + password: "changeme" + server_url: "https://foreman.example.com" organization: "Default Organization" - content_view: Web Servers - filter_type: "rpm" - package_name: tcsh - min_version: 6.20.00 - inclusion: true + name: "modulemd filter" + content_view: "Standard Operating Environment" + filter_type: modulemd ''' RETURN = '''