File: _expected_ssh_port.yml

package info (click to toggle)
python-mitogen 0.3.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,708 kB
  • sloc: python: 24,457; sh: 198; makefile: 74; perl: 19; ansic: 18
file content (20 lines) | stat: -rw-r--r-- 816 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Ansible removed its default SSH port in May 2021, defering to the SSH
# implementation.
# https://github.com/ansible/ansible/commit/45618a6f3856f7332df8afe4adc40d85649a70da

# Careful templating is needed to preseve the type(s) of expected_ssh_port,
# particularly in combination with the assert_equal action plugin.
# Do:     {{ expected_ssh_port }}
# Don't:  {{ expected_ssh_port | any_filter }}
# Don't:  {% if ...%}{{ expected_ssh_port }}{% else %}...{% endif %}
# https://stackoverflow.com/questions/66102524/ansible-set-fact-type-cast/66104814#66104814

- set_fact:
    expected_ssh_port: null
  when:
    - ansible_version_major_minor_patch is version('2.11.1', '>=', strict=True)

- set_fact:
    expected_ssh_port: 22
  when:
    - ansible_version_major_minor_patch is version('2.11.1', '<', strict=True)