main.yml 508 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. - name: Install dependencies
  3. become: true
  4. apt:
  5. pkg:
  6. - nginx
  7. - nginx-extras
  8. - name: Copy nginx configuration
  9. become: true
  10. copy:
  11. src: files/conf
  12. dest: /etc/nginx/nginx.conf
  13. mode: 0644
  14. - name: Create directory for stream configurations
  15. become: true
  16. file:
  17. path: /etc/nginx/streams.d/
  18. state: directory
  19. - name: Disable NGINX default configuration
  20. become: true
  21. file:
  22. path: /etc/nginx/conf.d/default.conf
  23. state: absent
  24. notify:
  25. - Restart nginx