Skip to content

Commit

Permalink
Move ferm configuration to dependent variables
Browse files Browse the repository at this point in the history
  • Loading branch information
drybjed committed Oct 8, 2014
1 parent 65062a3 commit 3d345e9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 27 deletions.
3 changes: 1 addition & 2 deletions defaults/main.yml
Expand Up @@ -7,8 +7,7 @@ samba_shares_path: '{{ samba_path }}/shares'

# Allow access to Samba through firewall for specified networks
# If samba_allow is undefined or False, allow access from all
#samba_allow:
# - '192.168.0.0/16'
samba_allow: []

samba_workgroup: 'WORKGROUP'
samba_netbios_name: '{{ ansible_hostname }}'
Expand Down
17 changes: 17 additions & 0 deletions meta/main.yml
Expand Up @@ -2,6 +2,23 @@

dependencies:
- role: debops.ferm
ferm_input_list:

- type: 'dport_accept'
protocol: [ 'udp' ]
dport: [ 'netbios-ns', 'netbios-dgm' ]
saddr: '{{ samba_allow }}'
accept_any: True
filename: 'samba_dependency_accept_udp'
weight: '50'

- type: 'dport_accept'
protocol: [ 'tcp' ]
dport: [ 'netbios-ssn', 'microsoft-ds' ]
saddr: '{{ samba_allow }}'
accept_any: True
filename: 'samba_dependency_accept_tcp'
weight: '50'

galaxy_info:
author: 'Maciej Delmanowski'
Expand Down
6 changes: 0 additions & 6 deletions tasks/main.yml
Expand Up @@ -28,9 +28,3 @@
state=present line='nf_conntrack_netbios_ns'
when: samba_iptables is defined and samba_iptables

- name: Configure firewall for Samba server
template: src=etc/ferm/filter-input.d/samba.conf.j2
dest=/etc/ferm/filter-input.d/samba.conf
owner=root group=root mode=0644
notify: Restart ferm

19 changes: 0 additions & 19 deletions templates/etc/ferm/filter-input.d/samba.conf.j2

This file was deleted.

0 comments on commit 3d345e9

Please sign in to comment.