ansible web -i inventory_test -m apt -a "name=apache2 state=present" --become
Apache Service: auto start on boot, state started
ansible-doc service
ansible web -i inventory_test -m service -a "name=apache2 enabled=yes state=started" --become
Install mysqld
ansible db -i inventory_test -m apt -a "name=mysqld state=present" --become
Module
setup
ansible all -i inventory_test -m setup -a "filter=ansible_en*"
ansible all -i inventory_test -m setup -a "filter=ansible_mounts"
ansible all -i inventory_test -m setup -a "filter=ansible_mounts" --tree ./setup
Playbook
Plays are ordered sets of tasks to execute against host selections from your inventory
Playbook is a file containing one or more plays
notify handles from task and handlers
condition clause: based on os family (when: ansible_os_family == "Debian"), based on output