mirror of
https://github.com/roles-ansible/ansible_role_iperf.git
synced 2024-08-16 13:09:49 +02:00
28 lines
680 B
YAML
28 lines
680 B
YAML
---
|
|
- name: deploy systemd iperf.service
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: 'templates/iperf.service.j2'
|
|
dest: '/etc/systemd/system/iperf.service'
|
|
mode: 0644
|
|
group: root
|
|
owner: root
|
|
notify: systemctl restart iperf.service
|
|
|
|
- name: enable systemd iperf.service
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: 'iperf.service'
|
|
enabled: true
|
|
masked: false
|
|
when: iperf__systemd_enable | bool
|
|
notify: systemctl restart iperf.service
|
|
|
|
- name: masked systemd iperf.service
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: 'iperf.service'
|
|
state: stopped
|
|
enabled: false
|
|
masked: true
|
|
when: not iperf__systemd_enable | bool
|