mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-31 09:01:23 -07:00
[PR #6205/e9655239 backport][stable-6] ssh_config: add proxyjump option (#6236)
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>
(cherry picked from commit e96552396e
)
Co-authored-by: Gavin Will <g@gavinwill.me.uk>
This commit is contained in:
parent
be4d294b61
commit
5e1508e0df
4 changed files with 242 additions and 1 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue