Skip to content

Instantly share code, notes, and snippets.

@moreati
Created September 5, 2024 12:18
Show Gist options
  • Save moreati/f6a99ec0249d4ff1082a694f4b6fe07c to your computer and use it in GitHub Desktop.
Save moreati/f6a99ec0249d4ff1082a694f4b6fe07c to your computer and use it in GitHub Desktop.
Reproducer for Mitogen issue 905
[issue905]
ssh-args ansible_ssh_args="-o PermitLocalCommand=yes -o LocalCommand='touch {{ ssh_args_canary_file }}'"
ssh-common-args ansible_ssh_common_args="-o PermitLocalCommand=yes -o LocalCommand='touch {{ ssh_args_canary_file }}'"
ssh-extra-args ansible_ssh_extra_args="-o PermitLocalCommand=yes -o LocalCommand='touch {{ ssh_args_canary_file }}'"
[issue905:vars]
ansible_host=u2204.mynet
ssh_args_canary_file=/tmp/ssh_args_{{ inventory_hostname }}
- hosts: issue905
gather_facts: false
tasks:
- block:
- file:
path: "{{ ssh_args_canary_file }}"
state: absent
delegate_to: localhost
- meta: reset_connection
- ping:
- stat:
path: "{{ ssh_args_canary_file }}"
delegate_to: localhost
register: issue905_canary_stat
- assert:
that:
- issue905_canary_stat.stat.exists == true
quiet: true
fail_msg: issue905_canary_stat={{ issue905_canary_stat }}
always:
- name: Cleanup canary files
file:
path: "{{ ssh_args_canary_file }}"
state: absent
delegate_to: localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment