isolated connection timeout and log file for playbook out

This commit is contained in:
AlanCoding
2017-06-30 11:15:51 -04:00
parent 48371d433f
commit 70b1b9c81d
13 changed files with 131 additions and 59 deletions

View File

@@ -3,22 +3,25 @@
# The following variables will be set by the runner of this playbook:
# src: /tmp/some/path/private_data_dir/
- hosts: all
- name: Poll for status of active job.
hosts: all
gather_facts: false
tasks:
- shell: "tower-expect is-alive {{src}}"
- name: Determine if daemon process is alive.
shell: "tower-expect is-alive {{src}}"
register: is_alive
ignore_errors: true
- name: copy artifacts from the isolated host
- name: Copy artifacts from the isolated host.
synchronize:
src: "{{src}}/artifacts/"
dest: "{{src}}/artifacts/"
mode: pull
recursive: yes
- fail:
- name: Fail if previous check determined that process is not alive.
fail:
msg: "isolated task is still running"
when: "is_alive.rc == 0"

View File

@@ -4,7 +4,8 @@
# cleanup_dirs: ['/tmp/path/private_data_dir/', '/tmp//path/proot_temp_dir/']
# private_data_dir: '/tmp/path/private_data_dir/'
- hosts: all
- name: Clean up from isolated job run.
hosts: all
gather_facts: false
tasks:

View File

@@ -1,5 +1,6 @@
---
- hosts: all
- name: Periodic background status check of isolated instances.
hosts: all
gather_facts: false
tasks:

View File

@@ -5,11 +5,13 @@
# dest: /tmp/some/path/
# proot_temp_dir: /tmp/some/path
- hosts: all
- name: Prepare data, dispatch job in isolated environment.
hosts: all
gather_facts: false
vars_prompt:
- prompt: "Secret"
name: "secret"
private: yes
tasks: