nginx.yml 452 B

12345678910111213
  1. - name: Install nginx package
  2. action: ${ansible_pkg_mgr} pkg=nginx state=installed update_cache=yes
  3. when_boolean: ${with_nginx}
  4. - name: Install nginx status configuration
  5. action: template src=nginx/status.conf.j2 dest=/etc/nginx/conf.d/status.conf owner=root group=root mode=0644
  6. notify:
  7. - Reload nginx
  8. when_boolean: ${with_nginx}
  9. - name: Ensure nginx is running
  10. action: service name=nginx state=started
  11. when_boolean: ${with_nginx}