diff --git a/roles/cups/tasks/nginx.yml b/roles/cups/tasks/nginx.yml new file mode 100644 index 000000000..f1fb802b1 --- /dev/null +++ b/roles/cups/tasks/nginx.yml @@ -0,0 +1,16 @@ +- name: Enable http://box/print via NGINX, by installing {{ nginx_conf_dir }}/cups.conf from template + template: + src: cups.conf + dest: "{{ nginx_conf_dir }}/cups.conf" # /etc/nginx/conf.d + when: cups_enabled + +- name: Disable http://box/print via NGINX, by removing {{ nginx_conf_dir }}/cups.conf + file: + path: "{{ nginx_conf_dir }}/cups.conf" # /etc/nginx/conf.d + state: absent + when: not cups_enabled + +- name: Restart 'nginx' systemd service + systemd: + name: nginx + state: restarted