Modules: Run Commands
If Ansible doesn't have a module that suits your needs there are the “run command” modules:
- command: Takes the command and executes it on the host. The most secure and predictable.
- shell: Executes through a shell like
/bin/sh so you can use pipes etc. Be careful.
- raw: Executes a command without going through the Ansible module subsystem.
NOTE: Unlike standard modules, run commands have no concept of desired state and should only be used as a last resort.