commit
c60c9ed7a7
5 changed files with 54 additions and 0 deletions
@ -0,0 +1,4 @@
|
||||
--- |
||||
|
||||
head_node: "nprobe-head.example.com" |
||||
debug: false |
@ -0,0 +1,25 @@
|
||||
--- |
||||
|
||||
- name: Create opt directory |
||||
become: true |
||||
file: |
||||
path: /opt/nprobe/sbin |
||||
state: directory |
||||
mode: 0755 |
||||
|
||||
- name: Download nprobe |
||||
get_url: |
||||
url: "{{ nprobe_linux }}" |
||||
dest: /opt/nprobe/sbin/nprobe |
||||
checksum: "{{ nprobe_linux_sha256 }}" |
||||
mode: 0755 |
||||
|
||||
- name: Create systemd unit |
||||
template: |
||||
src: templates/nprobe_probe.service.j2 |
||||
dest: /etc/systemd/system/nprobe_probe.service |
||||
|
||||
- name: Start probe |
||||
systemd: |
||||
name: nprobe_probe |
||||
state: started |
@ -0,0 +1,6 @@
|
||||
--- |
||||
|
||||
- name: Install nprobe on linux |
||||
include_tasks: linux.yml |
||||
when: ansible_os_family == "RedHat" or |
||||
ansible_os_family == "Debian" |
@ -0,0 +1,15 @@
|
||||
[Unit] |
||||
Description=nprobe probe service |
||||
After=network.target |
||||
StartLimitIntervalSec=0 |
||||
|
||||
[Service] |
||||
Type=simple |
||||
Restart=always |
||||
RestartSec=1 |
||||
User=root |
||||
Environment="NPROBE_SECRET={{ nprobe_secret }}" |
||||
ExecStart=/opt/nprobe/sbin/nprobe --head {{ head_node }} --name {{ probe_name }} --privileged{% if defined nprobe_debug and nprobe_debug sameas true %} --debug{% endif %} |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
Loading…
Reference in new issue