Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ferm hard dependency and put rules in envvar. #12

Merged
merged 3 commits into from
Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,29 @@ samba__default_shares:
guest_ok: 'yes'

# .. )))

# .. envvar:: samba__ferm__dependent_rules: (((
#
# Configuration for :command:`iptables` firewall managed by :program:`ferm`.
samba__ferm__dependent_rules:

- type: 'dport_accept'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should rename both ferm rules to use the accept type.

protocol: [ 'udp' ]
dport: [ 'netbios-ns', 'netbios-dgm' ]
saddr: '{{ samba__allow }}'
accept_any: True
filename: 'samba__dependency_accept_udp'
delete: '{{ "samba" not in samba__base_packages }}'
weight: '50'

- type: 'dport_accept'
protocol: [ 'tcp' ]
dport: [ 'netbios-ssn', 'microsoft-ds' ]
saddr: '{{ samba__allow }}'
accept_any: True
filename: 'samba__dependency_accept_tcp'
delete: '{{ "samba" not in samba__base_packages }}'
weight: '50'


# .. )))
25 changes: 1 addition & 24 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
---

dependencies:

- role: debops.ferm
tags: [ 'depend::ferm', 'depend::ferm:samba',
'depend-of::samba', 'type::dependency' ]
ferm_input_list:

- type: 'dport_accept'
protocol: [ 'udp' ]
dport: [ 'netbios-ns', 'netbios-dgm' ]
saddr: '{{ samba__allow }}'
accept_any: True
filename: 'samba__dependency_accept_udp'
delete: '{{ "samba" not in samba__base_packages }}'
weight: '50'

- type: 'dport_accept'
protocol: [ 'tcp' ]
dport: [ 'netbios-ssn', 'microsoft-ds' ]
saddr: '{{ samba__allow }}'
accept_any: True
filename: 'samba__dependency_accept_tcp'
delete: '{{ "samba" not in samba__base_packages }}'
weight: '50'
dependencies: []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you set this to:

dependencies: []

Otherwise Ansible Galaxy will most likely reject the role import, since I've seen this behaviour before.


galaxy_info:

Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
state: 'present'
with_flattened: '{{ samba__kernel_modules }}'
when: (('samba' in samba__base_packages) and
(samba__kernel_modules_load is defined and samba__kernel_modules_load ))
(samba__kernel_modules_load|bool))

- name: Ensure kernel modules are loaded on system boot
template:
Expand All @@ -58,7 +58,7 @@
group: 'root'
mode: '0644'
when: (('samba' in samba__base_packages) and
(samba__kernel_modules_load is defined and samba__kernel_modules_load ))
(samba__kernel_modules_load|bool))

- name: Remove legacy entries from /etc/modules
lineinfile:
Expand Down