cups/server: Remove nginx frontend proxy

This commit is contained in:
Timo Makinen 2021-03-30 16:14:52 +00:00
parent a7f22619f9
commit e345e29b19
3 changed files with 30 additions and 19 deletions

View file

@ -1,3 +0,0 @@
location / {
proxy_pass https://localhost:631;
}

View file

@ -1,6 +1,5 @@
---
dependencies:
- {role: nginx/server}
- {role: kerberos/client}
- {role: ldap/nss}

View file

@ -27,6 +27,36 @@
line: "DefaultAuthType Negotiate"
notify: restart cups
- name: configure cups listen port
lineinfile:
path: /etc/cups/cupsd.conf
regexp: "^Listen (.*:)?631"
line: "Listen 631"
notify: restart cups
- name: link private key
file:
dest: "/etc/cups/ssl/{{ inventory_hostname }}.key"
src: "{{ tls_private }}/{{ inventory_hostname }}.key"
state: link
owner: root
group: "{{ ansible_wheel }}"
follow: false
force: true
notify: restart cups
- name: link certificate
file:
dest: "/etc/cups/ssl/{{ inventory_hostname }}.crt"
src: "{{ tls_certs }}/{{ inventory_hostname }}.crt"
state: link
owner: root
group: "{{ ansible_wheel }}"
follow: false
force: true
notify: restart cups
- name: disable printer advertising
lineinfile:
path: /etc/cups/cupsd.conf
@ -80,18 +110,3 @@
name: cups
enabled: true
state: started
- name: allow nginx to connect cups
seboolean:
name: httpd_can_network_connect
persistent: true
state: true
- name: configure nginx proxy
copy:
dest: "/etc/nginx/conf.d/{{ inventory_hostname }}/cups.conf"
src: cups-nginx.conf
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
notify: restart nginx