xoxys.cups/tasks/install.yml

39 lines
996 B
YAML
Raw Normal View History

2019-02-10 15:33:10 +00:00
---
- block:
- name: Copy cups rpms to destination host
copy:
src: "files/{{ item | basename }}"
dest: "{{ item }}"
2019-02-10 15:33:10 +00:00
owner: root
group: root
mode: 0640
loop: "{{ __cups_rpm_files }}"
- name: Install cups rpms
yum:
2019-02-10 16:25:00 +00:00
name: "{{ __cups_rpm_files }}"
2019-02-10 15:33:10 +00:00
state: present
2019-02-12 22:31:40 +00:00
notify: __cupsd_restart
2019-02-10 17:21:25 +00:00
- name: Install custom driver packages
yum:
name: "{{ cups_custom_driver_packages }}"
state: present
2019-02-12 22:31:40 +00:00
notify: __cupsd_restart
2019-02-10 17:21:25 +00:00
- name: Deploy global config files
template:
src: "etc/cups/cupsd.conf.j2"
dest: "/etc/cups/cupsd.conf"
mode: 0640
notify: __cupsd_restart
2019-02-10 17:33:57 +00:00
- name: Open ports in iptables
iptables_raw:
name: allow_cups
state: present
2019-02-10 17:46:59 +00:00
rules: '-A INPUT -m state --state NEW -p tcp --dport {{ cups_nginx_proxy_url.split(":")[1] }} -j ACCEPT'
2019-02-10 17:33:57 +00:00
when: cups_iptables_enabled
2019-02-10 15:33:10 +00:00
become: True
become_user: root