commit
554df475b3
6 changed files with 151 additions and 0 deletions
@ -0,0 +1,38 @@ |
||||
Ansible role for deploy node-exporter packages and services. You can add custom ports via variables bellow. |
||||
|
||||
This role is developed with Ansible 2.9.6 and tested on Ubuntu 20.04 LTS. |
||||
|
||||
## Role Variables |
||||
|
||||
| Variable | Required | Default | Comments | |
||||
| -------- | -------- | ------- | -------- | |
||||
| `additional_ports` | No | `{}` | Add aditional ports while using this role | |
||||
|
||||
## Requirements |
||||
|
||||
Ansible.posix collection |
||||
|
||||
To install it, use the following command: |
||||
|
||||
```yaml |
||||
ansible-galaxy collection install ansible.posix |
||||
``` |
||||
|
||||
## Run node-exporter role with default settings |
||||
```yaml |
||||
roles: |
||||
- sw-node-exporter |
||||
``` |
||||
|
||||
## Run node-exporter role with custom variables |
||||
```yaml |
||||
roles: |
||||
- sw-node-exporter |
||||
vars: |
||||
- additional_ports: |
||||
- 80/tcp |
||||
- 443/tcp |
||||
- 25565/udp |
||||
``` |
||||
|
||||
|
@ -0,0 +1,2 @@ |
||||
--- |
||||
additional_ports: {} |
@ -0,0 +1,5 @@ |
||||
--- |
||||
- name: restart transmission |
||||
ansible.builtin.systemd: |
||||
state: started |
||||
name: transmission-daemon |
@ -0,0 +1,31 @@ |
||||
--- |
||||
- name: sw-transmission | 1. Add transmissionbt repository from PPA and install its signing key on Ubuntu target |
||||
ansible.builtin.apt_repository: |
||||
repo: 'ppa:transmissionbt/ppa' |
||||
codename: trusty |
||||
|
||||
- name: sw-transmission | 2. Install transmission |
||||
ansible.builtin.apt: |
||||
name: |
||||
- transmission-cli |
||||
- transmission-common |
||||
- transmission-daemon |
||||
state: present |
||||
update_cache: yes |
||||
|
||||
- name: sw-transmission | 3. Create transmission user |
||||
ansible.builtin.user: |
||||
name: transmission |
||||
group: debian-transmission |
||||
|
||||
- name: sw-transmission | 4. Stop transmission-daemon |
||||
ansible.builtin.service: |
||||
name: transmission-daemon |
||||
state: stopped |
||||
|
||||
- name: sw-transmission | 5. Copy the transmission template file and restart transmission-daemon when changed |
||||
ansible.builtin.template: |
||||
src: transmission.j2 |
||||
dest: "{{ transmission_config_location }}" |
||||
notify: |
||||
- restart transmission |
@ -0,0 +1,73 @@ |
||||
{ |
||||
"alt-speed-down": 50, |
||||
"alt-speed-enabled": false, |
||||
"alt-speed-time-begin": 540, |
||||
"alt-speed-time-day": 127, |
||||
"alt-speed-time-enabled": false, |
||||
"alt-speed-time-end": 1020, |
||||
"alt-speed-up": 50, |
||||
"bind-address-ipv4": "0.0.0.0", |
||||
"bind-address-ipv6": "::", |
||||
"blocklist-enabled": false, |
||||
"blocklist-url": "http://www.example.com/blocklist", |
||||
"cache-size-mb": 4, |
||||
"dht-enabled": true, |
||||
"download-dir": "/mnt/nfs/", |
||||
"download-limit": 100, |
||||
"download-limit-enabled": 0, |
||||
"download-queue-enabled": true, |
||||
"download-queue-size": 5, |
||||
"encryption": 1, |
||||
"idle-seeding-limit": 30, |
||||
"idle-seeding-limit-enabled": false, |
||||
"incomplete-dir": "/mnt/nfs/transmission-daemon/incomplete", |
||||
"incomplete-dir-enabled": false, |
||||
"lpd-enabled": false, |
||||
"max-peers-global": 200, |
||||
"message-level": 1, |
||||
"peer-congestion-algorithm": "", |
||||
"peer-id-ttl-hours": 6, |
||||
"peer-limit-global": 200, |
||||
"peer-limit-per-torrent": 50, |
||||
"peer-port": 51413, |
||||
"peer-port-random-high": 65535, |
||||
"peer-port-random-low": 49152, |
||||
"peer-port-random-on-start": false, |
||||
"peer-socket-tos": "default", |
||||
"pex-enabled": true, |
||||
"port-forwarding-enabled": false, |
||||
"preallocation": 1, |
||||
"prefetch-enabled": true, |
||||
"queue-stalled-enabled": true, |
||||
"queue-stalled-minutes": 30, |
||||
"ratio-limit": 2, |
||||
"ratio-limit-enabled": false, |
||||
"rename-partial-files": true, |
||||
"rpc-authentication-required": false, |
||||
"rpc-bind-address": "0.0.0.0", |
||||
"rpc-enabled": true, |
||||
"rpc-host-whitelist": "", |
||||
"rpc-host-whitelist-enabled": false, |
||||
"rpc-password": "{f8725ded06b27e09c891c2e981229a192731c432yBA6cUrs", |
||||
"rpc-port": 9091, |
||||
"rpc-url": "/transmission/", |
||||
"rpc-username": "transmission", |
||||
"rpc-whitelist": "127.0.0.1,192.168.*.*", |
||||
"rpc-whitelist-enabled": true, |
||||
"scrape-paused-torrents-enabled": true, |
||||
"script-torrent-done-enabled": false, |
||||
"script-torrent-done-filename": "", |
||||
"seed-queue-enabled": false, |
||||
"seed-queue-size": 10, |
||||
"speed-limit-down": 100, |
||||
"speed-limit-down-enabled": false, |
||||
"speed-limit-up": 5, |
||||
"speed-limit-up-enabled": true, |
||||
"start-added-torrents": true, |
||||
"trash-original-torrent-files": false, |
||||
"umask": 2, |
||||
"upload-limit": 100, |
||||
"upload-limit-enabled": 0, |
||||
"upload-slots-per-torrent": 14, |
||||
"utp-enabled": true |
||||
} |
@ -0,0 +1,2 @@ |
||||
--- |
||||
transmission_config_location: /var/lib/transmission-daemon/info/settings.json |
Loading…
Reference in new issue