Ansible Notes
Ansible Notes
Ansible Notes
Module: whenever ansible command issued or ran ,module will go to client and
sits there. It will create communication path between server and client to
execute the command.
/etc/ansible/ansible.cfg
Modules: ping, yum , copy, service, file, command, exicute, shell , ec2, aws,
user, group
Ansible -m ping all >> ping status for all clients available in hosts file.
sample playbook1
---
- hosts: all
tasks:
- name: installing package
yum: name=httpd state=present
- name: creating file
file: path=/tmp/playbook state=touch
- name: httpd service restart
service: name=httpd state=started