ansible 1.7.2
ansible windows -i host -m win_ping
ansible winhost.example.com -m setup
ansible-playbook -i /home/matiasvx/ansible_test/host msi.yml
http://docs.ansible.com/win_copy_module.html
################################################################################
SETUP
-
matiasvx@debian:~$ cp ~/.ssh/id_rsa.pub /home/matiasvx/ansible_test/files/debian.pub
-
ansible-playbook -i ../linux key.yml --ask-pass
key.yml
-
hosts: linux sudo : yes tasks:
- authorized_key: user=perinola key="{{ lookup('file', "../files/debian.pub") }}
-
This will should not ask you for a password : ansible-playbook -i ../linux copy.yml
-
Another example : ansible -i linux st-per-ml2-vl23.asdc.lab -m shell -a "uptime"
-
cd /home/matiasvx/ansible_test/playbooks && /usr/bin/ansible-playbook -i ../linux mar.yml --extra-vars target=${option.command} Rundeck Job
####################################################################################################################3
HOST laptop :
-
ansible-playbook -i hosts site.yml --ask-sudo-pass
-
ansible-playbook -i hosts site.yml --list-tasks
-
ansible-playbook -i hosts site.yml -t simple
https://github.com/ansible/ansible-examples/tree/master/lamp_simple