-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.yml
36 lines (29 loc) · 1.4 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- name: Testing NFTables Modules
hosts: testing
become: true
gather_facts: false
vars:
ansible_host: "{{ lookup('ansible.builtin.env', ansible_host_env_var) | default(_ansible_host) }}"
ansible_port: "{{ lookup('ansible.builtin.env', 'TEST_PORT') | default(_ansible_port) }}"
ansible_user: "{{ lookup('ansible.builtin.env', 'TEST_USER') | default(_ansible_user) }}"
ansible_sudo_pass: "{{ lookup('ansible.builtin.env', 'TEST_PWD') | default(_ansible_sudo_pass) }}"
test_module: 'all'
tasks:
- name: RUNNING TESTS of module ansibleguy.nftables.list
ansible.builtin.import_tasks: tasks/list.yml
when: "test_module in ['all', 'list']"
- name: RUNNING TESTS of module ansibleguy.nftables.table
ansible.builtin.import_tasks: tasks/table.yml
when: "test_module in ['all', 'table']"
- name: RUNNING TESTS of module ansibleguy.nftables.chain
ansible.builtin.import_tasks: tasks/chain.yml
when: "test_module in ['all', 'chain']"
- name: RUNNING TESTS of module ansibleguy.nftables.rule_raw
ansible.builtin.import_tasks: tasks/rule_raw.yml
when: "test_module in ['all', 'rule_raw']"
- name: RUNNING TESTS of module ansibleguy.nftables.rule
ansible.builtin.import_tasks: tasks/rule.yml
when: "test_module in ['all', 'rule']"
# - name: Testing NFTables Modules - Cleanup
# ansible.builtin.import_playbook: cleanup.yml