Clean tasks name and comments in tasks/main.yml file
This commit is contained in:
parent
4047d64c76
commit
a5199dc0f2
|
@ -1,3 +1,8 @@
|
||||||
|
## vX.Y.Z
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
* Clean tasks name and comments in tasks/main.yml file.
|
||||||
|
|
||||||
## v1.5.0
|
## v1.5.0
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
---
|
---
|
||||||
|
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||||||
|
#
|
||||||
# tasks file for nftables
|
# tasks file for nftables
|
||||||
|
|
||||||
- name: Load specific OS vars for nft
|
- name: Load specific OS vars for nftables
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml"
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml"
|
||||||
- "{{ ansible_distribution|lower }}.yml"
|
- "{{ ansible_distribution|lower }}.yml"
|
||||||
- "{{ ansible_os_family|lower }}.yml"
|
- "{{ ansible_os_family|lower }}.yml"
|
||||||
|
|
||||||
# package {{{
|
# Manage packages [[[1
|
||||||
- name: INSTALL Manage nftables packages
|
- name: Ensure Nftables packages are in there desired state
|
||||||
package:
|
package:
|
||||||
name: '{{ item }}'
|
name: '{{ item }}'
|
||||||
state: '{{ nft_pkg_state }}'
|
state: '{{ nft_pkg_state }}'
|
||||||
|
@ -19,7 +21,7 @@
|
||||||
until: pkg_install_result is success
|
until: pkg_install_result is success
|
||||||
when: nft_enabled|bool
|
when: nft_enabled|bool
|
||||||
|
|
||||||
- name: INSTALL Remove iptables packages
|
- name: Ensure old Iptables packages are in there desired state
|
||||||
apt:
|
apt:
|
||||||
name: '{{ item }}'
|
name: '{{ item }}'
|
||||||
state: '{{ nft_old_pkg_state }}'
|
state: '{{ nft_old_pkg_state }}'
|
||||||
|
@ -30,10 +32,8 @@
|
||||||
when: (nft_enabled|bool and
|
when: (nft_enabled|bool and
|
||||||
nft_old_pkg_manage|bool)
|
nft_old_pkg_manage|bool)
|
||||||
|
|
||||||
# }}}
|
# Common configuration [[[1
|
||||||
|
- name: Ensure to create nftables.d directory
|
||||||
# conf {{{
|
|
||||||
- name: CONFIG create nftables.d dir
|
|
||||||
file:
|
file:
|
||||||
path: "{{ nft_conf_dir_path }}"
|
path: "{{ nft_conf_dir_path }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -51,28 +51,6 @@
|
||||||
notify: ['Restart nftables service']
|
notify: ['Restart nftables service']
|
||||||
when: nft_enabled|bool
|
when: nft_enabled|bool
|
||||||
|
|
||||||
- name: CONFIG generate input rules file
|
|
||||||
template:
|
|
||||||
src: "{{ nft_input_conf_content }}"
|
|
||||||
dest: "{{ nft_input_conf_path }}"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0755
|
|
||||||
backup: yes
|
|
||||||
notify: ['Restart nftables service']
|
|
||||||
when: nft_enabled|bool
|
|
||||||
|
|
||||||
- name: CONFIG generate output rules file
|
|
||||||
template:
|
|
||||||
src: "{{ nft_output_conf_content }}"
|
|
||||||
dest: "{{ nft_output_conf_path }}"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0755
|
|
||||||
backup: yes
|
|
||||||
notify: ['Restart nftables service']
|
|
||||||
when: nft_enabled|bool
|
|
||||||
|
|
||||||
- name: CONFIG generate vars definition file
|
- name: CONFIG generate vars definition file
|
||||||
template:
|
template:
|
||||||
src: "{{ nft_define_conf_content }}"
|
src: "{{ nft_define_conf_content }}"
|
||||||
|
@ -84,7 +62,7 @@
|
||||||
notify: ['Restart nftables service']
|
notify: ['Restart nftables service']
|
||||||
when: nft_enabled|bool
|
when: nft_enabled|bool
|
||||||
|
|
||||||
- name: CONFIG generate sets and maps file
|
- name: CONFIG generate sets file
|
||||||
template:
|
template:
|
||||||
src: "{{ nft_set_conf_content }}"
|
src: "{{ nft_set_conf_content }}"
|
||||||
dest: "{{ nft_set_conf_path }}"
|
dest: "{{ nft_set_conf_path }}"
|
||||||
|
@ -94,11 +72,32 @@
|
||||||
backup: yes
|
backup: yes
|
||||||
notify: ['Restart nftables service']
|
notify: ['Restart nftables service']
|
||||||
when: nft_enabled|bool
|
when: nft_enabled|bool
|
||||||
# }}}
|
|
||||||
|
|
||||||
# service {{{
|
# Filter table content [[[1
|
||||||
|
- name: Filter table - generate input rules file
|
||||||
|
template:
|
||||||
|
src: "{{ nft_input_conf_content }}"
|
||||||
|
dest: "{{ nft_input_conf_path }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
backup: yes
|
||||||
|
notify: ['Restart nftables service']
|
||||||
|
when: nft_enabled|bool
|
||||||
|
|
||||||
- name: install Debian systemd service unit
|
- name: Filter table - generate output rules file
|
||||||
|
template:
|
||||||
|
src: "{{ nft_output_conf_content }}"
|
||||||
|
dest: "{{ nft_output_conf_path }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
backup: yes
|
||||||
|
notify: ['Restart nftables service']
|
||||||
|
when: nft_enabled|bool
|
||||||
|
|
||||||
|
# Manage service [[[1
|
||||||
|
- name: Install Debian systemd service unit
|
||||||
template:
|
template:
|
||||||
src: '{{ nft_service_unit_content }}'
|
src: '{{ nft_service_unit_content }}'
|
||||||
dest: '{{ nft_service_unit_path }}'
|
dest: '{{ nft_service_unit_path }}'
|
||||||
|
@ -109,5 +108,3 @@
|
||||||
when: (nft_enabled|bool and
|
when: (nft_enabled|bool and
|
||||||
nft_service_manage|bool)
|
nft_service_manage|bool)
|
||||||
notify: ['Restart nftables service']
|
notify: ['Restart nftables service']
|
||||||
|
|
||||||
# }}}
|
|
||||||
|
|
Loading…
Reference in New Issue