Skip to content

Commit

Permalink
Merge pull request #9 from stone-payments/fix/duplicated_code
Browse files Browse the repository at this point in the history
Remove duplicated code from RedHat and Debian
  • Loading branch information
iblackman authored Aug 20, 2018
2 parents 249b422 + 70745ee commit 36cd9c8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 27 deletions.
11 changes: 5 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
include: custom-whitelist.yml
when: squid_custom_whitelist is defined and squid_custom_whitelist

# Install RedHat-like
- include: squid-RedHat.yml
when: ansible_os_family == 'RedHat'
- name: install squid
package: name={{ squid_package }} state=present update_cache=yes

# Install Debian-like
- include: squid-Debian.yml
when: ansible_os_family == 'Debian'
- name: copy template
template: src=squid.conf.j2 dest={{ squid_conf }} owner=root group=root mode=0644
notify: restart squid
7 changes: 0 additions & 7 deletions tasks/squid-Debian.yml

This file was deleted.

7 changes: 0 additions & 7 deletions tasks/squid-RedHat.yml

This file was deleted.

3 changes: 0 additions & 3 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ squid_daemon: squid
squid_path: /etc/squid
squid_conf: /etc/squid/squid.conf
squid_cache_dir: /var/spool/squid

squid_diskcache: 'ufs {{ squid_cache_dir }} 100 16 256'
#squid_diskcache: '' # Disables cache
3 changes: 0 additions & 3 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ squid_daemon: squid
squid_path: /etc/squid
squid_conf: /etc/squid/squid.conf
squid_cache_dir: /var/spool/squid

squid_diskcache: 'ufs {{ squid_cache_dir }} 100 16 256'
#squid_diskcache: '' # Disables cache
3 changes: 2 additions & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# vars file for squid
squid_acl_dir: /etc/squid/acl_files
squid_diskcache: 'ufs {{ squid_cache_dir }} 100 16 256'
squid_acl_dir: /etc/squid/acl_files

0 comments on commit 36cd9c8

Please sign in to comment.