Files Facts¶
directory
¶
host.fact.directory(path)
file
¶
host.fact.file(path)
find_directories
¶
host.fact.find_directories(name)
Returns a list of directories from a start point, recursively using find.
find_files
¶
host.fact.find_files(name)
Returns a list of files from a start point, recursively using find.
find_in_file
¶
host.fact.find_in_file(name, 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.
find_links
¶
host.fact.find_links(name)
Returns a list of links from a start point, recursively using find.
link
¶
host.fact.link(path)
sha1_file
¶
host.fact.sha1_file(name)
Returns a SHA1 hash of a file. Works with both sha1sum and sha1.
socket
¶
host.fact.socket(path)