fix indentations
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-01-12 14:29:51 +01:00
parent d35cec8ad9
commit ca1e020915
3 changed files with 42 additions and 39 deletions

View File

@ -1,3 +1,4 @@
# Standards: 0.1
---
galaxy_info:
author: xoxys
@ -5,9 +6,9 @@ galaxy_info:
license: MIT
min_ansible_version: 2.4
platforms:
- name: EL
versions:
- 7
- name: EL
versions:
- 7
galaxy_tags:
- firewall
- iptables

View File

@ -1,33 +1,34 @@
---
- name: Setup iptables
block:
- name: Set custom iptables rules
iptables_raw:
name: 'iptables_custom_rules_{{ item.name }}'
rules: '{{ item.rules }}'
state: '{{ item.state }}'
weight: '{{ item.weight|default(omit) }}'
table: '{{ item.table|default(omit) }}'
with_items: '{{ iptables_custom_rules }}'
loop_control:
label: "{{item.name}}"
tags: iptables
- name: Set custom iptables rules
iptables_raw:
name: 'iptables_custom_rules_{{ item.name }}'
rules: '{{ item.rules }}'
state: '{{ item.state }}'
weight: '{{ item.weight|default(omit) }}'
table: '{{ item.table|default(omit) }}'
with_items: '{{ iptables_custom_rules }}'
loop_control:
label: "{{item.name}}"
tags: iptables
- name: Set default iptables head rules
iptables_raw:
name: iptables_default_head
weight: 10
keep_unmanaged: '{{ iptables_keep_unmanaged }}'
state: present
rules: '{{ iptables_default_head }}'
tags: iptables
- name: Set default iptables head rules
iptables_raw:
name: iptables_default_head
weight: 10
keep_unmanaged: '{{ iptables_keep_unmanaged }}'
state: present
rules: '{{ iptables_default_head }}'
tags: iptables
- name: Set default iptables tail rules
iptables_raw:
name: iptables_default_tail
weight: 99
keep_unmanaged: '{{ iptables_keep_unmanaged }}'
state: '{{ (iptables_default_tail != "" ) | ternary("present", "absent") }}'
rules: '{{ iptables_default_tail }}'
tags: iptables
- name: Set default iptables tail rules
iptables_raw:
name: iptables_default_tail
weight: 99
keep_unmanaged: '{{ iptables_keep_unmanaged }}'
state: '{{ (iptables_default_tail != "" ) | ternary("present", "absent") }}'
rules: '{{ iptables_default_tail }}'
tags: iptables
become: True
become_user: root

View File

@ -1,14 +1,15 @@
---
- name: Install iptables
block:
- name: Install packages
package:
name: "{{ iptables_package }}"
state: latest
- name: Install packages
package:
name: "{{ iptables_package }}"
state: latest
- name: Enable and start service
service:
name: iptables
enabled: True
state: started
- name: Enable and start service
service:
name: iptables
enabled: True
state: started
become: True
become_user: root