- name: Enable http://box/print via NGINX, by installing {{ nginx_conf_dir }}/cups.conf from template
  template:
    src: cups.conf.j2
    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"
    state: absent
  when: not cups_enabled

- name: Restart 'nginx' systemd service
  systemd:
    name: nginx
    state: restarted