0920
This commit is contained in:
@@ -115,13 +115,22 @@
|
|||||||
ansible.builtin.meta: end_host
|
ansible.builtin.meta: end_host
|
||||||
when: (pick_port.stdout | trim | length) == 0
|
when: (pick_port.stdout | trim | length) == 0
|
||||||
|
|
||||||
- name: Record chosen local port and create ControlMaster socket dir
|
- name: Record chosen local port
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.set_fact:
|
set_fact:
|
||||||
_local_port: "{{ pick_port.stdout | trim }}"
|
_local_port: "{{ pick_port.stdout | trim }}"
|
||||||
_ctrl_dir: "{{ lookup('ansible.builtin.pipe', 'mktemp -d') }}"
|
|
||||||
|
- name: Create ControlMaster socket dir (mktemp)
|
||||||
|
delegate_to: localhost
|
||||||
|
set_fact:
|
||||||
|
_ctrl_dir: "{{ lookup('pipe', 'mktemp -d') }}"
|
||||||
|
|
||||||
|
- name: Compose ControlMaster socket path
|
||||||
|
delegate_to: localhost
|
||||||
|
set_fact:
|
||||||
_ctrl_sock: "{{ _ctrl_dir }}/ssh_tunnel_ctl"
|
_ctrl_sock: "{{ _ctrl_dir }}/ssh_tunnel_ctl"
|
||||||
|
|
||||||
|
|
||||||
- name: Start SSH ControlMaster and forward 127.0.0.1:local → DEV2:22 via DEV1
|
- name: Start SSH ControlMaster and forward 127.0.0.1:local → DEV2:22 via DEV1
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
|
|||||||
Reference in New Issue
Block a user