Fix integration tests to support remote hosts.

This commit is contained in:
Matt Clay
2019-01-24 19:25:06 -08:00
parent 92b475f721
commit d2a7cc0b9f
37 changed files with 321 additions and 225 deletions

View File

@@ -0,0 +1,11 @@
- name: create temporary directory
tempfile:
state: directory
suffix: .test
register: remote_tmp_dir
notify:
- delete temporary directory
- name: record temporary directory
set_fact:
remote_tmp_dir: "{{ remote_tmp_dir.path }}"

View File

@@ -0,0 +1,10 @@
- name: make sure we have the ansible_os_family and ansible_distribution_version facts
setup:
gather_subset: distribution
when: ansible_facts == {}
- include_tasks: "{{ lookup('first_found', files)}}"
vars:
files:
- "{{ ansible_os_family | lower }}.yml"
- "default.yml"

View File

@@ -0,0 +1,11 @@
- name: create temporary directory
win_tempfile:
state: directory
suffix: .test
register: remote_tmp_dir
notify:
- delete temporary directory (windows)
- name: record temporary directory
set_fact:
remote_tmp_dir: "{{ remote_tmp_dir.path }}"