From 5ea889e5781951cec450516641518b36b8236d5a Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 1 May 2014 20:24:37 +0000 Subject: [PATCH] Playbook to free up port 5099 when it gets stuck. --- playbooks/manual/liberate-5099.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 playbooks/manual/liberate-5099.yml diff --git a/playbooks/manual/liberate-5099.yml b/playbooks/manual/liberate-5099.yml new file mode 100644 index 0000000000..6d0dc791c6 --- /dev/null +++ b/playbooks/manual/liberate-5099.yml @@ -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 }}"