process host facts for iso runs

* Move isolated clean to our final run hook
* ISO and non-iso code path now share the post-fact-processing code
This commit is contained in:
chris meyers
2019-03-29 13:50:29 -04:00
parent 21e5179a84
commit 71fcb1a82c
3 changed files with 21 additions and 25 deletions

View File

@@ -18,20 +18,10 @@
src: "{{src}}/artifacts/"
dest: "{{src}}/artifacts/"
mode: pull
delete: yes
recursive: yes
- name: Fail if previous check determined that process is not alive.
fail:
msg: "isolated task is still running"
when: "is_alive.rc == 0"
- stat: path="{{src}}/facts/"
register: fact_cache
- name: Copy gathered facts from the isolated host.
synchronize:
src: "{{src}}/facts/"
dest: "{{src}}/facts/"
delete: yes # delete fact cache records that go missing via clear_facts
mode: pull
when: fact_cache.stat.exists