playbook.yml 669 B

123456789101112131415161718192021222324
  1. - name: configure webserver
  2. hosts: servera.lab.example.com
  3. tasks:
  4. - name: include environment tasks
  5. include_tasks: tasks/environment.yml
  6. vars:
  7. package: httpd
  8. service: httpd
  9. - name: include firewall tasks
  10. include_tasks: tasks/firewall.yml
  11. vars:
  12. firewall_pkg: firewalld
  13. firewall_svc: firewalld
  14. rule:
  15. - http
  16. - https
  17. - name: include placeholder tasks
  18. include_tasks: tasks/placeholder.yml
  19. vars:
  20. file: /var/www/html/index.html
  21. - name: test play file and set the variable
  22. import_playbook: plays/test.yml
  23. vars:
  24. url: 'http://servera.lab.example.com'