Test for key files generated by the role

This commit is contained in:
Paweł Krawczyk 2021-08-08 21:48:02 +01:00
parent a0fd38056a
commit 0669fe1623
No known key found for this signature in database
GPG Key ID: 32AF1F39C4EE03F2
1 changed files with 30 additions and 0 deletions

View File

@ -6,6 +6,36 @@
gather_facts: false
tasks:
- name: check for nftables.d
stat:
path: /etc/nftables.d
register: s
- name: check nftables.d
assert:
that:
- p.stat.exists and p.stat.isdir
- name: check for nftables.conf
stat:
path: /etc/nftables.conf
register: s
- name: check nftables.conf
assert:
that:
- p.stat.exists
- name: check for nftables.conf
stat:
path: /etc/nftables.d/filter-input.nft
register: s
- name: check filter-input.nft
assert:
that:
- p.stat.exists
- name: list rules
command: nft list ruleset
register: nft