Ansible—How to pass multiple module arguments ( parameters, MODULE_ARGS ) to ansible command and represent playbook?
Describe key=value
pari separated with spaces.
$ ansible -m "[module_name]" --args="key1=value2 key2=value2"
$ ansible localhost -m 'file' --args="path=example.txt state=touch"
Above ansible command's means bellow in playbook.
- hosts: localhost
tasks:
- file:
path: example.txt
state: touch
- ansible 2.6.0