rcx_one / rcx_one.linkoverlay / 0.1.0 / module / clean clears a path while keeping files contained in a journal | "added in version" 0.1.0 of rcx_one.linkoverlay" Authors: Eike (@E1k3)rcx_one.linkoverlay.clean (0.1.0) — module
Install with ansible-galaxy collection install rcx_one.linkoverlay:==0.1.0
collections: - name: rcx_one.linkoverlay version: 0.1.0
Removes all paths in a directory except those contained in an exclude list. Meant to be used with the journal callback or journal role to make sure a directory does not contain anything that was not created by ansible. Because of this, lines beginning with '!' are interpreted as errors messages.
- name: Remove old synced files rcx_one.linkoverlay.clean: path: "/home/user/dotfiles" exclude: - "/home/user/dotfiles/keep_me"
path: description: The path to be cleaned. required: true type: path exclude: default: [] description: The lines of the journal of files to keep. elements: str required: false type: list
removed: description: Removed paths returned: changed sample: - /home/user/old_file type: list