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: galaxy_info:
author: xoxys author: xoxys
@ -5,9 +6,9 @@ galaxy_info:
license: MIT license: MIT
min_ansible_version: 2.4 min_ansible_version: 2.4
platforms: platforms:
- name: EL - name: EL
versions: versions:
- 7 - 7
galaxy_tags: galaxy_tags:
- firewall - firewall
- iptables - iptables

View File

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

View File

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