diff --git a/plugins/modules/host_contain.py b/plugins/modules/host_contain.py index 06e29092..d12a8bd1 100644 --- a/plugins/modules/host_contain.py +++ b/plugins/modules/host_contain.py @@ -32,6 +32,8 @@ hosts: description: - A list of host agent IDs (AIDs) to perform the action on. + - Use the P(crowdstrike.falcon.host_ids#lookup) lookup plugin to get a list of host IDs matching + specific criteria. type: list elements: str required: true @@ -68,6 +70,11 @@ - "09876543210987654321" contained: no +- name: Contain all hosts in RFM + crowdstrike.falcon.host_contain: + hosts: "{{ lookup('crowdstrike.falcon.host_ids', 'reduced_functionality_mode:\"yes\"') }}" + contained: yes + - name: Individually contain hosts within a list crowdstrike.falcon.host_contain: auth: "{{ falcon.auth }}" # Use auth saved from crowdstrike.falcon.auth module diff --git a/plugins/modules/host_hide.py b/plugins/modules/host_hide.py index 9c3a4dec..0247d1bc 100644 --- a/plugins/modules/host_hide.py +++ b/plugins/modules/host_hide.py @@ -33,6 +33,8 @@ hosts: description: - A list of host agent IDs (AIDs) to perform the action on. + - Use the P(crowdstrike.falcon.host_ids#lookup) lookup plugin to get a list of host IDs matching + specific criteria. type: list elements: str required: true @@ -73,6 +75,10 @@ - "09876543210987654321" hidden: false +- name: Hide all stale hosts that have not checked in for 30 days + crowdstrike.falcon.host_hide: + hosts: "{{ lookup('crowdstrike.falcon.host_ids', 'last_seen:<=\"now-30d\"') }}" + - name: Individually hide hosts with a list from the Falcon console crowdstrike.falcon.host_hide: auth: "{{ falcon.auth }}" # Use auth saved from crowdstrike.falcon.auth module