mirror of
https://github.com/ansible/awx.git
synced 2026-05-22 08:17:39 -02:30
Support for executing job and adhoc commands on isolated Tower nodes (#6524)
This commit is contained in:
18
awx/playbooks/clean_isolated.yml
Normal file
18
awx/playbooks/clean_isolated.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
|
||||
# The following variables will be set by the runner of this playbook:
|
||||
# private_dirs: ['/tmp/path/private_data_dir/', '/tmp//path/proot_temp_dir/']
|
||||
# job_id: <pk>
|
||||
|
||||
- hosts: all
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
|
||||
- name: cancel the job
|
||||
command: "systemctl stop playbook@{{job_id}}.service"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: remove build artifacts
|
||||
file: path="{{item}}" state=absent
|
||||
with_items: "{{private_dirs}}"
|
||||
Reference in New Issue
Block a user