crawl_n_mask – This module mask secrets in yaml/json/log files/dirs
Synopsis
This module crawls over a directory (default) and find yaml/json/log files which may have secrets in it, and proceeds with masking it.
If you pass a directory, it will crawl the directory and find eligible files to mask.
Parameters
- path (True, path, None)
This is the target file/dir you want to mask.
- isdir (False, bool, False)
Tells if the path is dir or not.
Supported options are True and False.
Set value to False if path is file, else True.
Defaults to False.
Examples
- name: Mask secrets in all yaml/json/log files within /home/zuul/logs
cifmw.general.crawl_n_mask:
path: /home/zuul/logs
isdir: True
- name: Mask my_secrets.yaml
cifmw.general.crawl_n_mask:
path: /home/zuul/logs/my_secrets.yaml
- name: Mask application.log
cifmw.general.crawl_n_mask:
path: /var/log/application.log
Return Values
- success (always, bool, True)
Status of the execution