Commit 584a41f0 by ansible

no message

1 parent efeb13be
Showing with 3 additions and 0 deletions
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
- name: Get running processes - name: Get running processes
shell: lsof -n -i4TCP |grep -v 'ssh' | grep LISTEN | awk '{ print $2 }' shell: lsof -n -i4TCP |grep -v 'ssh' | grep LISTEN | awk '{ print $2 }'
register: running_processes register: running_processes
ignore_errors: yes
- name: Kill running processes - name: Kill running processes
shell: "kill {{ item }}" shell: "kill {{ item }}"
with_items: "{{ running_processes.stdout_lines }}" with_items: "{{ running_processes.stdout_lines }}"
ignore_errors: yes
- wait_for: - wait_for:
path: "/proc/{{ item }}/status" path: "/proc/{{ item }}/status"
...@@ -17,6 +19,7 @@ ...@@ -17,6 +19,7 @@
- name: Force kill stuck processes - name: Force kill stuck processes
shell: "kill -9 {{ item }}" shell: "kill -9 {{ item }}"
with_items: "{{ killed_processes.results | select('failed') | map(attribute='item') | list }}" with_items: "{{ killed_processes.results | select('failed') | map(attribute='item') | list }}"
ignore_errors: yes
# END # END
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!