Skip to content

Commit 698c82d

Browse files
committed
adds teap playbooks
1 parent 7dd7e25 commit 698c82d

File tree

3 files changed

+87
-0
lines changed

3 files changed

+87
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
- hosts: pfservers
3+
name: configure Packetfence VM
4+
become: True
5+
6+
vars:
7+
debianPackages:
8+
- curl
9+
- python3-pip
10+
- virtualenv
11+
- jq
12+
13+
el8Packages:
14+
- curl
15+
- python3-pip
16+
- python3-setuptools
17+
- virtualenv
18+
- jq
19+
20+
tasks:
21+
- name: Install packages on debian
22+
package:
23+
name: "{{ debianPackages }}"
24+
state: present
25+
when: ansible_facts['os_family'] == "Debian"
26+
27+
- name: Install packages on el8
28+
package:
29+
name: "{{ el8Packages }}"
30+
state: present
31+
when: ansible_facts['os_family'] == "RedHat"
32+
33+
- name: Install xmltodict python package
34+
pip:
35+
name: xmltodict
36+
when: ansible_facts['os_family'] == "RedHat"
37+
38+
- name: Install xmltodict python package
39+
shell: |
40+
set -e -o pipefail
41+
pip install xmltodict --break-system-packages
42+
args:
43+
executable: /usr/bin/bash
44+
when: ansible_facts['os_family'] == "Debian"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
- hosts: pfservers
3+
name: Run dot1x_eap_teap tests
4+
become: True
5+
6+
vars:
7+
test_suites:
8+
- configurator
9+
- global_config
10+
- wired_dot1x_eap_teap
11+
- wired_dot1x_eap_teap/teardown
12+
- global_teardown
13+
14+
tasks:
15+
- name: Run Venom testsuites
16+
command: '{{ venom_dir }}/venom-wrapper.sh {{ venom_dir }}/test_suites/{{ item }}'
17+
args:
18+
chdir: '{{ venom_dir }}'
19+
loop: '{{ test_suites }}'
20+
vars:
21+
venom_wrapper_args:
22+
# temp, overcome Venom issue:
23+
# - when running test suite one by one, previous logs and results are overriden
24+
# Venom will create one directory per test suite to store results
25+
VENOM_COMMON_FLAGS: '--output-dir={{ venom_dir }}/results/{{ item }}
26+
--var test_suite_results_dir={{ venom_dir }}/results/{{ item }}'
27+
28+
# add inventory__group_environment to Ansible environment
29+
# useful to make env vars available for Venom
30+
environment: '{{ inventory__group_environment | d({})
31+
| combine(venom_wrapper_args | d({})) }}'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
# Development environnement
3+
## rsync before tests when doing local development
4+
## preinstall vim
5+
## fix term
6+
- import_playbook: ../common/dev.yml
7+
when: lookup("env", "CI") != 'true'
8+
9+
# Add extra configuration before running venom tests
10+
- import_playbook: playbooks/configure.yml
11+
12+
- import_playbook: playbooks/run_tests.yml

0 commit comments

Comments
 (0)