Added previous iperf conf
This commit is contained in:
parent
0a9d28b8f7
commit
427c554e9f
8 changed files with 73 additions and 0 deletions
3
defaults/main.yml
Normal file
3
defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
iperf3:
|
||||||
|
port: 9200
|
3
handlers/main.yml
Normal file
3
handlers/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
# - name: Refresh aliases
|
||||||
|
# shell: newaliases
|
2
meta/.galaxy_install_info
Normal file
2
meta/.galaxy_install_info
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
install_date: Sat Oct 22 16:45:23 2022
|
||||||
|
version: ''
|
22
meta/main.yml
Normal file
22
meta/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
galaxy_info:
|
||||||
|
author: Antonio J. Delgado (ajdelgado)
|
||||||
|
description: TODO - Description
|
||||||
|
|
||||||
|
# issue_tracker_url: https://github.com/uoi-io/ansible-galera/issues
|
||||||
|
|
||||||
|
license: GPLv3
|
||||||
|
|
||||||
|
min_ansible_version: "2.0"
|
||||||
|
|
||||||
|
github_branch: master
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- focal
|
||||||
|
- jammy
|
||||||
|
|
||||||
|
galaxy_tags: []# TODO
|
||||||
|
|
||||||
|
dependencies: []
|
18
tasks/configure.yml
Normal file
18
tasks/configure.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Ensure iperf3 systemd unit is installed
|
||||||
|
template:
|
||||||
|
dest: /etc/systemd/system/iperf3.service
|
||||||
|
src: templates/iperf3.service.j2
|
||||||
|
backup: yes
|
||||||
|
|
||||||
|
- name: Ensure iperf3 service is enabled and running
|
||||||
|
systemd:
|
||||||
|
name: iperf3.service
|
||||||
|
state: started
|
||||||
|
enabled: yes
|
||||||
|
when: "'WSL' not in ansible_facts['kernel']"
|
||||||
|
|
||||||
|
- name: Allow iperf3 port in UFW
|
||||||
|
ufw:
|
||||||
|
rule: allow
|
||||||
|
port: "{{ iperf3.port }}"
|
6
tasks/install.yml
Normal file
6
tasks/install.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: Ensure iperf packages are installed
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- iperf
|
||||||
|
- iperf3
|
5
tasks/main.yml
Normal file
5
tasks/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: Ensure installation
|
||||||
|
include_tasks: install.yml
|
||||||
|
- name: Ensure configuration
|
||||||
|
include_tasks: configure.yml
|
14
templates/iperf3.service.j2
Normal file
14
templates/iperf3.service.j2
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Managed by Ansible
|
||||||
|
# /etc/systemd/system/iperf3.service
|
||||||
|
# User service: $HOME/.config/systemd/user/iperf3.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=iperf3 server
|
||||||
|
After=syslog.target network.target auditd.service
|
||||||
|
OnFailure=status_email_antoniodelgado@%n.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/iperf3 -s --port {{ iperf3.port }}
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue