Playbook to free up port 5099 when it gets stuck.
This commit is contained in:
parent
22b56a5341
commit
5ea889e578
1 changed files with 14 additions and 0 deletions
14
playbooks/manual/liberate-5099.yml
Normal file
14
playbooks/manual/liberate-5099.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
# requires --extra-vars="target='host1;host2;group etc'
|
||||
|
||||
- name: Find whatever is running on port 5099 and storm its figurative bastille.
|
||||
hosts: "{{ target }}"
|
||||
user: root
|
||||
|
||||
tasks:
|
||||
- name: find the PID of whatever is on port 5099
|
||||
command: lsof -i :5099 -t
|
||||
register: offenders
|
||||
|
||||
- name: salt the earth
|
||||
command: "kill {{ item }}"
|
||||
with_items: "{{ offenders.stdout_lines }}"
|
Loading…
Add table
Add a link
Reference in a new issue