mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Review finding, better readability
This commit is contained in:
parent
d7ed94729a
commit
a317dac8ea
1 changed files with 119 additions and 113 deletions
|
@ -85,42 +85,49 @@ DOCUMENTATION = r"""
|
|||
vars:
|
||||
- name: ansible_paramiko_use_rsa_sha2_algorithms
|
||||
ini:
|
||||
- {key: use_rsa_sha2_algorithms, section: paramiko_connection}
|
||||
- section: paramiko_connection
|
||||
key: use_rsa_sha2_algorithms
|
||||
env:
|
||||
- {name: ANSIBLE_PARAMIKO_USE_RSA_SHA2_ALGORITHMS}
|
||||
- name: ANSIBLE_PARAMIKO_USE_RSA_SHA2_ALGORITHMS
|
||||
default: True
|
||||
type: boolean
|
||||
host_key_auto_add:
|
||||
description: Automatically add host keys.
|
||||
env: [{name: ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD}]
|
||||
env:
|
||||
- name: ANSIBLE_PARAMIKO_HOST_KEY_AUTO_ADD
|
||||
ini:
|
||||
- {key: host_key_auto_add, section: paramiko_connection}
|
||||
- section: paramiko_connection
|
||||
key: host_key_auto_add
|
||||
type: boolean
|
||||
look_for_keys:
|
||||
default: True
|
||||
description: 'False to disable searching for private key files in ~/.ssh/.'
|
||||
env: [{name: ANSIBLE_PARAMIKO_LOOK_FOR_KEYS}]
|
||||
description: "False to disable searching for private key files in ~/.ssh/."
|
||||
env:
|
||||
- name: ANSIBLE_PARAMIKO_LOOK_FOR_KEYS
|
||||
ini:
|
||||
- {key: look_for_keys, section: paramiko_connection}
|
||||
- section: paramiko_connection
|
||||
key: look_for_keys
|
||||
type: boolean
|
||||
proxy_command:
|
||||
default: ''
|
||||
default: ""
|
||||
description:
|
||||
- Proxy information for running the connection via a jumphost.
|
||||
- Also this plugin will scan 'ssh_args', 'ssh_extra_args' and 'ssh_common_args' from the 'ssh' plugin settings for proxy information if set.
|
||||
type: string
|
||||
env: [{name: ANSIBLE_PARAMIKO_PROXY_COMMAND}]
|
||||
env:
|
||||
- name: ANSIBLE_PARAMIKO_PROXY_COMMAND
|
||||
ini:
|
||||
- {key: proxy_command, section: paramiko_connection}
|
||||
- section: paramiko_connection
|
||||
key: proxy_command
|
||||
vars:
|
||||
- name: ansible_paramiko_proxy_command
|
||||
ssh_args:
|
||||
description: Only used in parsing ProxyCommand for use in this plugin.
|
||||
default: ''
|
||||
default: ""
|
||||
type: string
|
||||
ini:
|
||||
- section: 'ssh_connection'
|
||||
key: 'ssh_args'
|
||||
- section: "ssh_connection"
|
||||
key: "ssh_args"
|
||||
env:
|
||||
- name: ANSIBLE_SSH_ARGS
|
||||
vars:
|
||||
|
@ -133,15 +140,15 @@ DOCUMENTATION = r"""
|
|||
description: Only used in parsing ProxyCommand for use in this plugin.
|
||||
type: string
|
||||
ini:
|
||||
- section: 'ssh_connection'
|
||||
key: 'ssh_common_args'
|
||||
- section: "ssh_connection"
|
||||
key: "ssh_common_args"
|
||||
env:
|
||||
- name: ANSIBLE_SSH_COMMON_ARGS
|
||||
vars:
|
||||
- name: ansible_ssh_common_args
|
||||
cli:
|
||||
- name: ssh_common_args
|
||||
default: ''
|
||||
default: ""
|
||||
deprecated:
|
||||
why: In favor of the "proxy_command" option.
|
||||
version: "0.1.0"
|
||||
|
@ -158,23 +165,23 @@ DOCUMENTATION = r"""
|
|||
section: ssh_connection
|
||||
cli:
|
||||
- name: ssh_extra_args
|
||||
default: ''
|
||||
default: ""
|
||||
deprecated:
|
||||
why: In favor of the "proxy_command" option.
|
||||
version: "0.1.0"
|
||||
alternatives: proxy_command
|
||||
pty:
|
||||
default: True
|
||||
description: 'SUDO usually requires a PTY, True to give a PTY and False to not give a PTY.'
|
||||
description: "SUDO usually requires a PTY, True to give a PTY and False to not give a PTY."
|
||||
env:
|
||||
- name: ANSIBLE_PARAMIKO_PTY
|
||||
ini:
|
||||
- section: paramiko_connection
|
||||
key: pty
|
||||
- key: pty
|
||||
section: paramiko_connection
|
||||
type: boolean
|
||||
record_host_keys:
|
||||
default: True
|
||||
description: 'Save the host keys to a file'
|
||||
description: "Save the host keys to a file"
|
||||
env:
|
||||
- name: ANSIBLE_PARAMIKO_RECORD_HOST_KEYS
|
||||
ini:
|
||||
|
@ -182,7 +189,7 @@ DOCUMENTATION = r"""
|
|||
key: record_host_keys
|
||||
type: boolean
|
||||
host_key_checking:
|
||||
description: 'Set this to V(False) if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host.'
|
||||
description: "Set this to V(False) if you want to avoid host key checking by the underlying tools Ansible uses to connect to the host."
|
||||
type: boolean
|
||||
default: True
|
||||
env:
|
||||
|
@ -199,7 +206,7 @@ DOCUMENTATION = r"""
|
|||
- name: ansible_ssh_host_key_checking
|
||||
- name: ansible_paramiko_host_key_checking
|
||||
use_persistent_connections:
|
||||
description: 'Toggles the use of persistence for connections'
|
||||
description: "Toggles the use of persistence for connections"
|
||||
type: boolean
|
||||
default: False
|
||||
env:
|
||||
|
@ -257,7 +264,7 @@ DOCUMENTATION = r"""
|
|||
- name: ansible_paramiko_private_key_file
|
||||
cli:
|
||||
- name: private_key_file
|
||||
option: '--private-key'
|
||||
option: "--private-key"
|
||||
vmid:
|
||||
description:
|
||||
- Container ID
|
||||
|
@ -331,13 +338,12 @@ EXAMPLES = r"""
|
|||
msg: "This is coming from pct environment"
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
import uuid
|
||||
from ansible.utils.display import Display
|
||||
from ansible.plugins.connection.paramiko_ssh import Connection as SSH_Connection
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.connection.paramiko_ssh import Connection as SSH_Connection
|
||||
from ansible.utils.display import Display
|
||||
import uuid
|
||||
import os
|
||||
|
||||
|
||||
display = Display()
|
||||
|
|
Loading…
Reference in a new issue