Closed moreati closed 1 month ago
Templated port keyword fails, but only on the combination macOS with Ansible 20 (ansible-core 2.17). Both Mitogen+Ansible and vanilla Ansible are affected
- name: integration/ssh/templated_by_play_keyword.yml
hosts: tt_targets_bare
gather_facts: false
port: "{{ hostvars[groups['test-targets'][0]].ansible_port | default(22) }}"
remote_user: "{{ 'mitogen__has_sudo_nopw' | trim }}"
vars:
ansible_password: has_sudo_nopw_password
tasks:
- meta: reset_connection
- name: Templated variables in play keywords
ping:
PLAY [integration/ssh/templated_by_play_keyword.yml] ***************************
TASK [meta _raw_params=reset_connection] ***************************************
Wednesday 09 October 2024 13:49:22 +0000 (0:00:01.514) 0:04:22.030 *****
ERROR! Invalid type for configuration option plugin_type: connection plugin: mitogen_ssh setting: port (from keyword: port): invalid literal for int() with base 10: "{{ hostvars[groups['test-targets'][0]].ansible_port | default(22) }}"
usage: ansible-playbook [-h] [--version] [-v] [--private-key PRIVATE_KEY_FILE]
[-u REMOTE_USER] [-c CONNECTION] [-T TIMEOUT]
PLAY [integration/ssh/templated_by_play_keyword.yml] ***************************
TASK [meta _raw_params=reset_connection] ***************************************
Wednesday 09 October 2024 13:50:11 +0000 (0:00:20.686) 0:04:39.457 *****
ERROR! Invalid type for configuration option plugin_type: connection plugin: ssh setting: port (from keyword: port): invalid literal for int() with base 10: "{{ hostvars[groups['test-targets'][0]].ansible_port | default(22) }}"
usage: ansible-playbook [-h] [--version] [-v] [--private-key PRIVATE_KEY_FILE]
[-u REMOTE_USER] [-c CONNECTION] [-T TIMEOUT]
refs #1040