mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Fix integration tests to support remote hosts.
This commit is contained in:
@@ -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 }}"
|
||||
10
test/integration/targets/setup_remote_tmp_dir/tasks/main.yml
Normal file
10
test/integration/targets/setup_remote_tmp_dir/tasks/main.yml
Normal 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"
|
||||
@@ -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 }}"
|
||||
Reference in New Issue
Block a user