I know it's possible to run multiple adhoc commands one after the other for each module and using playbook.
Playbook:
- hosts: webservers
tasks:
- name: create .ssh dir
file: path ~/.ssh state=directory
- name: copy pub key
copy: src:~/.ssh/id.rsa_pub dest=~/.ssh/authorized_keys
I want the above to execute using adhoc in one line. Is it possible to do so?