mirror of https://github.com/ansible/ansible.git
add cleanup
ci_coverage
parent
f5f4695db1
commit
de6c2eab0f
@ -1,7 +1,6 @@
|
||||
repo_path: '{{ remote_tmp_dir }}/git_repositories'
|
||||
|
||||
exec: []
|
||||
git_package: git
|
||||
git_daemon: git-daemon
|
||||
|
||||
repo_path: '{{ remote_tmp_dir }}/git_repositories'
|
||||
repositories: []
|
||||
exec: []
|
||||
serve_timeout: 100
|
||||
|
@ -0,0 +1,20 @@
|
||||
- when: started_daemon is defined
|
||||
block:
|
||||
- name: Check if git daemon is running
|
||||
command: 'pgrep -f "git daemon --export-all --enable=receive-pack --base-path={{ repo_path }} {{ repo_path }}"'
|
||||
register: pid
|
||||
ignore_errors: true
|
||||
|
||||
- name: Stop the git daemon
|
||||
command: "kill {{ pid.stdout_lines | first }}"
|
||||
when: pid.stdout_lines|length> 1
|
||||
|
||||
- name: Clean up after async task
|
||||
async_status:
|
||||
jid: '{{ started_daemon.ansible_job_id }}'
|
||||
mode: cleanup
|
||||
register: status_result
|
||||
vars:
|
||||
# https://github.com/ansible/ansible/issues/77450#issuecomment-1437626656
|
||||
ansible_async_dir: '{{ started_daemon.results_file|dirname }}'
|
||||
when: started_daemon is defined
|
Loading…
Reference in New Issue