This DOPi Plugin will check if the specified file on the node exists. This plugin is usually used as a verify command to check if a command has to be executed on a node.
The ssh/file_exists command plugin is based on the ssh custom command plugin and the custom command plugin and inherits all their parameters.
It will however overwrite the exec parameter, so it is not possible to set a custom command in this plugin.
The file to check
- name: 'Install Puppet'
nodes: all
command:
plugin: 'ssh/custom'
verify_commands:
- plugin: 'ssh/file_exists'
file: '/usr/bin/puppet'
exec: 'yum'
arguments: 'install -y puppet'