Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2013 22:28
Show Gist options
  • Save anonymous/7979176 to your computer and use it in GitHub Desktop.
Save anonymous/7979176 to your computer and use it in GitHub Desktop.
ansible issue
[router]
router.releng.net ansible_ssh_host=127.0.0.1
[router:vars]
[request_router]
[request_router:vars]
process_identifier=log4j-dxad-web.xml
[request_router:children]
router
[memcached_router]
[memcached_router:vars]
process_identifier=log4j-memcached-router.xml
[memcached_router:children]
router
[realtime_system_components]
[realtime_system_components:vars]
rts_user=dxrts
[realtime_system_components:children]
request_router
[router]
router.releng.net ansible_ssh_host=127.0.0.1
[router:vars]
[request_router]
[request_router:vars]
process_identifier=log4j-dxad-web.xml
[request_router:children]
router
[memcached_router]
[memcached_router:vars]
process_identifier=log4j-memcached-router.xml
[memcached_router:children]
router
#[realtime_system_components]
#
#[realtime_system_components:vars]
#rts_user=dxrts
#
#[realtime_system_components:children]
#request_router
- hosts: request_router
tasks:
- include: kill_process.yml
- hosts: memcached_router
tasks:
- include: kill_process.yml
- name: Kill process if not stopped gracefully
shell: pgrep -f {{ process_identifier }} && (echo "Killing"; pkill -9 -f {{ process_identifier }});
ignore_errors: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment