2018-04-05 18:35:21 +00:00
|
|
|
|
2018-04-18 14:43:54 +00:00
|
|
|
- name: integration/action/make_tmp_path.yml
|
|
|
|
hosts: all
|
2018-04-05 18:35:21 +00:00
|
|
|
any_errors_fatal: true
|
2018-04-16 14:55:41 +00:00
|
|
|
gather_facts: true
|
2018-04-05 18:35:21 +00:00
|
|
|
tasks:
|
|
|
|
|
|
|
|
- action_passthrough:
|
|
|
|
method: _make_tmp_path
|
|
|
|
register: out
|
|
|
|
|
|
|
|
- assert:
|
2018-04-16 14:48:20 +00:00
|
|
|
# This string must match ansible.cfg::remote_tmp
|
2018-04-16 14:55:41 +00:00
|
|
|
that: out.result.startswith("{{ansible_user_dir}}/.ansible/mitogen-tests/")
|
2018-04-05 18:35:21 +00:00
|
|
|
|
|
|
|
- stat:
|
|
|
|
path: "{{out.result}}"
|
|
|
|
register: st
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that: st.stat.exists and st.stat.isdir and st.stat.mode == "0700"
|
|
|
|
|
|
|
|
- file:
|
|
|
|
path: "{{out.result}}"
|
|
|
|
state: absent
|