2018-10-08 22:24:17 +00:00
|
|
|
- name: Install Wondershaper systemd unit file from template
|
|
|
|
template:
|
|
|
|
backup: yes
|
|
|
|
src: roles/network/templates/wondershaper/wondershaper.service
|
|
|
|
dest: /etc/systemd/system/wondershaper.service
|
|
|
|
mode: 0644
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-08 22:24:17 +00:00
|
|
|
- name: Install /usr/bin/wondershaper from template
|
|
|
|
template:
|
|
|
|
backup: yes
|
|
|
|
src: roles/network/templates/wondershaper/wondershaper.j2
|
|
|
|
dest: /usr/bin/wondershaper
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0744
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-10-27 15:49:55 +00:00
|
|
|
- name: Create conf.d directory
|
2018-10-08 22:24:17 +00:00
|
|
|
file:
|
|
|
|
path: /etc/conf.d
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0755
|
|
|
|
state: directory
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-08 22:24:17 +00:00
|
|
|
- name: Install /etc/conf.d/wondershaper.conf from template
|
|
|
|
template:
|
|
|
|
src: roles/network/templates/wondershaper/wondershaper.conf
|
|
|
|
dest: /etc/conf.d/wondershaper.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0600
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-08 22:24:17 +00:00
|
|
|
- name: Create fact (link) for /etc/conf.d/wondershaper.conf
|
|
|
|
file:
|
|
|
|
src: /etc/conf.d/wondershaper.conf
|
|
|
|
dest: /etc/ansible/facts.d/wondershaper.fact
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
state: link
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2020-01-12 04:31:47 +00:00
|
|
|
- name: "Add 'wondershaper_installed: True' to {{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
2019-10-16 16:06:02 +00:00
|
|
|
lineinfile:
|
2019-10-25 01:05:47 +00:00
|
|
|
dest: "{{ iiab_state_file }}"
|
2019-10-16 16:06:02 +00:00
|
|
|
regexp: '^wondershaper_installed'
|
|
|
|
line: 'wondershaper_installed: True'
|
|
|
|
state: present
|
|
|
|
|
2018-10-15 11:01:09 +00:00
|
|
|
- name: Add 'wondershaper' variable values to {{ iiab_ini_file }}
|
2018-10-08 22:24:17 +00:00
|
|
|
ini_file:
|
2018-10-15 10:13:57 +00:00
|
|
|
dest: "{{ iiab_ini_file }}"
|
2018-10-08 22:24:17 +00:00
|
|
|
section: wondershaper
|
|
|
|
option: "{{ item.option }}"
|
2020-01-12 02:41:37 +00:00
|
|
|
value: "{{ item.value | string }}"
|
2017-05-27 18:09:50 +00:00
|
|
|
with_items:
|
|
|
|
- option: name
|
|
|
|
value: wondershaper
|
|
|
|
- option: description
|
2017-10-27 15:49:55 +00:00
|
|
|
value: '"Wondershaper is a command line tool to set maximum transfer rates for network adapters."'
|
2017-05-27 18:09:50 +00:00
|
|
|
- option: enabled
|
|
|
|
value: "{{ wondershaper_enabled }}"
|