sap / sap.sap_operations / 1.25.0 / filter / mount_path Return the mount path of the filepath. | "added in version" 1.10.0 of sap.sap_operations" Authors: Ondra Machacek (@machacekondra), Kirill Satarin (@kksat)sap.sap_operations.mount_path (1.25.0) — filter
Install with ansible-galaxy collection install sap.sap_operations:==1.25.0
collections: - name: sap.sap_operations version: 1.25.0
Filter plugin is intended to be used this way ansible_facts['mounts'] | sap.sap_operations.mount_path(filepath='/file/path')
From all mounts only one where file is located will be returned.
All other mounts will be filtered out.
- name: Example how to use mount_path filter debug: msg: "{{ ansible_facts['mounts'] | sap.sap_operations.mount_path(filepath='/') }}"
filepath: description: From all mounts only mount that contain this filepath will not be filtered out. required: true type: path
data: description: - Parameter `mount` from `ansible_mounts` list that was collected by `ansible.builtin.setup` module - This is mount point there file with provided `filepath` is located. - If provided filepath is not found filter returns None. - If list of mounts is empty filter returns None. type: str