Skip to content

Commit

Permalink
Shorter task names.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-de-bock committed Sep 20, 2023
1 parent b1c103e commit 9e3bac9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
---

- name: assert | Test if fail2ban_loglevel is set correctly
- name: assert | Test fail2ban_loglevel
ansible.builtin.assert:
that:
- fail2ban_loglevel is defined
- fail2ban_loglevel is string
- fail2ban_loglevel in [ "CRITICAL", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG" ]
quiet: yes

- name: assert | Test if fail2ban_logtarget is set correctly
- name: assert | Test fail2ban_logtarget
ansible.builtin.assert:
that:
- fail2ban_logtarget is defined
- fail2ban_logtarget is string
- fail2ban_logtarget is not none
quiet: yes

- name: assert | Test if fail2ban_ignoreself is set correctly
- name: assert | Test fail2ban_ignoreself
ansible.builtin.assert:
that:
- fail2ban_ignoreself is defined
- fail2ban_ignoreself is string
- fail2ban_ignoreself in [ "false", "true" ]
quiet: yes

- name: assert | Test if fail2ban_ignoreips is set correctly
- name: assert | Test fail2ban_ignoreips
ansible.builtin.assert:
that:
- fail2ban_ignoreips is defined
- fail2ban_ignoreips is iterable
quiet: yes

- name: assert | Test if fail2ban_bantime is set correctly
- name: assert | Test fail2ban_bantime
ansible.builtin.assert:
that:
- fail2ban_bantime is defined
- fail2ban_bantime is number
- fail2ban_bantime >= -1 and fail2ban_bantime !=0
quiet: yes

- name: assert | Test if fail2ban_findtime is set correctly
- name: assert | Test fail2ban_findtime
ansible.builtin.assert:
that:
- fail2ban_findtime is defined
- fail2ban_findtime is number
- fail2ban_findtime > 0
quiet: yes

- name: assert | Test if fail2ban_maxretry is set correctly
- name: assert | Test fail2ban_maxretry
ansible.builtin.assert:
that:
- fail2ban_maxretry is defined
- fail2ban_maxretry is number
- fail2ban_maxretry > 0
quiet: yes

- name: assert | Test if fail2ban_destemail is set correctly
- name: assert | Test fail2ban_destemail
ansible.builtin.assert:
that:
- fail2ban_destemail is defined
- fail2ban_destemail is string
- fail2ban_destemail is not none
quiet: yes

- name: assert | Test if fail2ban_sender is set correctly
- name: assert | Test fail2ban_sender
ansible.builtin.assert:
that:
- fail2ban_sender is defined
- fail2ban_sender is string
- fail2ban_sender is not none
quiet: yes

- name: assert | Test if fail2ban_configuration is set correctly
- name: assert | Test fail2ban_configuration
ansible.builtin.assert:
that:
- fail2ban_configuration is iterable
quiet: yes
when:
- fail2ban_configuration is defined

- name: assert | Test if item in fail2ban_configuration is set correctly
- name: assert | Test item in fail2ban_configuration
ansible.builtin.assert:
that:
- item.option is defined
Expand All @@ -96,7 +96,7 @@
when:
- fail2ban_configuration is defined

- name: assert | Test if fail2ban_jail_configuration is set correctly
- name: assert | Test fail2ban_jail_configuration
ansible.builtin.assert:
that:
- item.option is defined
Expand All @@ -113,7 +113,7 @@
when:
- fail2ban_jail_configuration is defined

- name: assert | Test if item in fail2ban_filterd_path is set correctly
- name: assert | Test item in fail2ban_filterd_path
ansible.builtin.assert:
that:
- fail2ban_filterd_path is string
Expand Down

0 comments on commit 9e3bac9

Please sign in to comment.