ansible-doc COPY
# Check if Ping-able without HostChecking
ANSIBLE_HOST_KEY_CHECKING=False ansible all -m ping -o
# -o for one liner
# or add this in the ansible
host_key_checking = False
# View user used per Host
ansible all -m command -a 'id' -o
# Use EXTRA_VARS
ansible all -e ansible_port=222 -m ping -o
# File module that touch-command a file.
ansible all -m file -a 'path=/tmp/test state=touch'
# Run Command to remote to check file was created.
ssh centos2 ls -la /tmp/test
ansible all -m file -a 'path=ssss state=touch'
ansible all -m file --help
#From Controller to remote
ansible all -m copy -a 'src=/tmp/x dest=/tmp/x'
#From remote to remote
ansible all -m copy -a 'remote_src=yes src=/tmp/x dest=/tmp/y'
ansible all -m file -a 'path=/tmp/test_module.txt state=touch mode=600' -o
ansible all -m copy --help
#From Controller to remote
ansible all -a 'ls'
#From Controller to remote. Reverse of COPY
ansible all -m fetch -a 'src=/tmp/test_module.txt dest=/tmp' -o