/root
/roles
web.yml
/web ansible的一个组
/files
/handlers
/tasks(必须有)
installmariadb.yml
installnginx.yml
installuwsgi.yml
installredis.yml
main.yml
/templates
/vars
web.yml
- hosts: web remote_user: root roles: - web
installmariadb.yml
- name: installmariadb yum: name=mariadb
installnginx.yml
- name: installnginx yum: name=nginx
installuwsgi.yml
- name: installuwsgi yum: name=uwsgi
installredis.yml
- name: installredis yum: name=redis
main.yml
- import_tasks: installnginx.yml- import_tasks: installuwsgi.yml- import_tasks: installmariadb.yml- import_tasks: installredis.yml