xoxys.cups/tasks/install.yml
Robert Kaussow f7bed9d50a
Some checks failed
continuous-integration/drone/push Build is failing
fix iptables rule
2019-02-10 18:37:13 +01:00

32 lines
812 B
YAML

---
- block:
- name: Copy cups rpms to destination host
copy:
src: "files/{{ item | basename }}"
dest: "{{ item }}"
owner: root
group: root
mode: 0640
loop: "{{ __cups_rpm_files }}"
- name: Install cups rpms
yum:
name: "{{ __cups_rpm_files }}"
state: present
- name: Deploy global config files
template:
src: "etc/cups/cupsd.conf.j2"
dest: "/etc/cups/cupsd.conf"
mode: 0640
notify: __cupsd_restart
- name: Open ports in iptables
iptables_raw:
name: allow_cups
state: present
rules: 'A INPUT -m state --state NEW -p tcp --dport {{ cups_nginx_proxy_url | urlsplit("port") }} -j ACCEPT'
when: cups_iptables_enabled
become: True
become_user: root