These are the built-in remote access functions available to use within the pmpolicy file.
Syntax
int remotefileexists ( string hostname, string filename )
Description
The remotefileexists function checks whether a filename exists on the remote system hostname.
Returns true if the file exists; otherwise, it returns false.
The remote host must be configured to run either pmmasterd or pmclientd to respond to this function.
Example
print(remotefileexists(runhost,"/etc/passwd"))
Syntax
list remotegroupinfo ( string hostname, string groupname )
Description
remotegroupinfo returns the group ID and a list of members of the specified group from the remote host.
The remote host must be configured to run either pmmasterd or pmclientd to respond to this function.
Example
#print the bin group info from the runhost
print(remoteuserinfo(runhost,"bin"))
Syntax
list remotegrouplist ( string hostname )
Description
remotegrouplist returns the full list of group names and the associated group IDs located on the remote host.
The remote host must be configured to run either pmmasterd or pmclientd to respond to this function.
Example
#print the remote groups on runhost
print(remotegrouplist(runhost))