ssh_config: add proxyjump option (#6205)

* feat(ssh_config): proxyjump option

* feat(ssh_config: add proxyjump test

* CamelCase ProxyJump

* add changelog fragment

* Update plugins/modules/ssh_config.py

add version_added

Co-authored-by: Felix Fontein <felix@fontein.de>

* update task name to include new proxyjump option

* adding tests for proxyjump option

* fixing assert variable name

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Gavin Will 2023-03-25 22:16:46 +00:00 committed by GitHub
commit e96552396e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 242 additions and 1 deletions

View file

@ -186,6 +186,25 @@
- not mut_ex.changed
- "'parameters are mutually exclusive' in mut_ex.msg"
- name: Check if proxycommand and proxyjump are mutually exclusive
community.general.ssh_config:
ssh_config_file: "{{ ssh_config_test }}"
host: "example.com"
hostname: github.com
proxycommand: "ssh jumphost.example.com -W %h:%p"
proxyjump: "jumphost.example.com"
identity_file: '{{ ssh_private_key }}'
port: '2224'
state: present
register: proxy_mut_ex
ignore_errors: true
- name: Check mutual exclusive test - proxycommand and proxyjump
assert:
that:
- not proxy_mut_ex.changed
- "'parameters are mutually exclusive' in proxy_mut_ex.msg"
- name: Add a full name host
community.general.ssh_config:
ssh_config_file: "{{ ssh_config_test }}"
@ -222,5 +241,5 @@
- short_name.hosts_changed == []
- short_name.hosts_removed == []
- name: Include integration tests for additional options (e.g. proxycommand)
- name: Include integration tests for additional options (e.g. proxycommand, proxyjump)
include: 'options.yml'