|
@@ -0,0 +1,44 @@
|
|
|
|
+---
|
|
|
|
+- name: Ensure packages are installed
|
|
|
|
+ yum:
|
|
|
|
+ name:
|
|
|
|
+ - nginx
|
|
|
|
+ - squid
|
|
|
|
+
|
|
|
|
+- name: Configure squid
|
|
|
|
+ template:
|
|
|
|
+ src: squid.conf.j2
|
|
|
|
+ dest: /etc/squid/squid.conf
|
|
|
|
+ owner: root
|
|
|
|
+ group: root
|
|
|
|
+ mode: '0644'
|
|
|
|
+ notify:
|
|
|
|
+ - Restart squid
|
|
|
|
+
|
|
|
|
+- name: Configure nginx
|
|
|
|
+ template:
|
|
|
|
+ src: squid-proxy.conf.j2
|
|
|
|
+ dest: /etc/nginx/default.d/squid-proxy.conf
|
|
|
|
+ owner: root
|
|
|
|
+ group: root
|
|
|
|
+ mode: '0644'
|
|
|
|
+ notify:
|
|
|
|
+ - Restart nginx
|
|
|
|
+
|
|
|
|
+- name: Ensure firewall ports are opened
|
|
|
|
+ firewalld:
|
|
|
|
+ service: "{{ item }}"
|
|
|
|
+ permanent: yes
|
|
|
|
+ state: enabled
|
|
|
|
+ with_items:
|
|
|
|
+ - squid
|
|
|
|
+ - http
|
|
|
|
+
|
|
|
|
+- name: Ensure services are enabled
|
|
|
|
+ systemd:
|
|
|
|
+ name: "{{ item }}"
|
|
|
|
+ enabled: yes
|
|
|
|
+ state: started
|
|
|
|
+ with_items:
|
|
|
|
+ - squid
|
|
|
|
+ - nginx
|