Files Facts

files.Directory

host.get_fact(Directory, path)

files.File

host.get_fact(File, path)

files.FindDirectories

host.get_fact(FindDirectories, path)

Returns a list of directories from a start point, recursively using find.

files.FindFiles

host.get_fact(FindFiles, path)

Returns a list of files from a start point, recursively using find.

files.FindInFile

host.get_fact(FindInFile, path, pattern)

Checks for the existence of text in a file using grep. Returns a list of matching lines if the file exists, and None if the file does not.

files.Md5File

host.get_fact(Md5File, path)

Returns an MD5 hash of a file.

files.Sha1File

host.get_fact(Sha1File, path)

Returns a SHA1 hash of a file. Works with both sha1sum and sha1.

files.Sha256File

host.get_fact(Sha256File, path)

Returns a SHA256 hash of a file.

files.Socket

host.get_fact(Socket, path)