Commit be97404f by ansible

no message

1 parent 41016fd7
Showing with 0 additions and 21 deletions
...@@ -2,27 +2,6 @@ ...@@ -2,27 +2,6 @@
- hosts: FormatAppDisk - hosts: FormatAppDisk
become: true become: true
tasks: tasks:
# Module Delete Process That Open Port Except SSH
- name: Get running processes
shell: lsof -n -i4TCP |grep -v 'ssh' | grep LISTEN | awk '{ print $2 }'
register: running_processes
- name: Kill running processes
shell: "kill {{ item }}"
with_items: "{{ running_processes.stdout_lines }}"
- wait_for:
path: "/proc/{{ item }}/status"
state: absent
with_items: "{{ running_processes.stdout_lines }}"
ignore_errors: yes
register: killed_processes
- name: Force kill stuck processes
shell: "kill -9 {{ item }}"
with_items: "{{ killed_processes.results | select('failed') | map(attribute='item') | list }}"
# END
# Read device information (always use unit when probing) # Read device information (always use unit when probing)
- parted: device="{{ app_disk }}" unit=MiB - parted: device="{{ app_disk }}" unit=MiB
register: sdb_info register: sdb_info
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!