You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/connection_remote_is_local/tasks/main.yml

16 lines
552 B
YAML

- command: ansible-playbook {{ role_path }}/test.yml -vvv -i {{ '-i '.join(ansible_inventory_sources) }}
environment:
ANSIBLE_REMOTE_TEMP: /i/dont/exist
ANSIBLE_NOCOLOR: 'true'
register: result
- assert:
that:
- >-
result.stdout is search('PUT ' ~ ansible_local ~ ' TO ' ~ ansible_local)
- >-
'/i/dont/exist' not in result.stdout
vars:
local_tmp: '{{ q("config", "remote_tmp", plugin_type="shell", plugin_name="sh")|first|expanduser|realpath }}'
ansible_local: '{{ local_tmp }}/ansible-local-\S+'