-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b339a6
commit d0a8b13
Showing
1 changed file
with
8 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,12 +29,9 @@ | |
- The only authentication method that works with this plugin is with ssh key file. | ||
- The input options supported by this connection plugin are the same as the ssh connection plugin of Ansible. | ||
author: | ||
- name: Sergios Lenis | ||
email: [email protected] | ||
- name: George Nikolopoulos | ||
email: [email protected] | ||
- name: Shiva Shankar Vaddepally | ||
email: [email protected] | ||
- Sergios Lenis ([email protected]) | ||
- George Nikolopoulos ([email protected]) | ||
- Shiva Shankar Vaddepally ([email protected]) | ||
version_added: "2.0.0" | ||
options: | ||
host: | ||
|
@@ -51,16 +48,12 @@ | |
key: 'host_key_checking' | ||
- section: ssh_connection | ||
key: 'host_key_checking' | ||
version_added: '2.5' | ||
env: | ||
- name: ANSIBLE_HOST_KEY_CHECKING | ||
- name: ANSIBLE_SSH_HOST_KEY_CHECKING | ||
version_added: '2.5' | ||
vars: | ||
- name: ansible_host_key_checking | ||
version_added: '2.5' | ||
- name: ansible_ssh_host_key_checking | ||
version_added: '2.5' | ||
password: | ||
description: Authentication password for the C(remote_user). Can be supplied as CLI option. | ||
vars: | ||
|
@@ -76,7 +69,6 @@ | |
- name: ANSIBLE_SSHPASS_PROMPT | ||
vars: | ||
- name: ansible_sshpass_prompt | ||
version_added: "2.0.0" | ||
ssh_args: | ||
description: Arguments to pass to all ssh cli tools | ||
default: '-C -o ControlMaster=auto -o ControlPersist=60s' | ||
|
@@ -87,16 +79,13 @@ | |
- name: ANSIBLE_SSH_ARGS | ||
vars: | ||
- name: ansible_ssh_args | ||
version_added: "2.0.0" | ||
ssh_common_args: | ||
description: Common extra args for all ssh CLI tools | ||
ini: | ||
- section: 'ssh_connection' | ||
key: 'ssh_common_args' | ||
version_added: '2.7' | ||
env: | ||
- name: ANSIBLE_SSH_COMMON_ARGS | ||
version_added: '2.7' | ||
vars: | ||
- name: ansible_ssh_common_args | ||
ssh_executable: | ||
|
@@ -108,68 +97,57 @@ | |
env: [{name: ANSIBLE_SSH_EXECUTABLE}] | ||
ini: | ||
- {key: ssh_executable, section: ssh_connection} | ||
#const: ANSIBLE_SSH_EXECUTABLE | ||
version_added: "2.2" | ||
version_added: "2.0.0" | ||
vars: | ||
- name: ansible_ssh_executable | ||
version_added: "2.0.0" | ||
sftp_executable: | ||
default: sftp | ||
description: | ||
- This defines the location of the sftp binary. It defaults to ``sftp`` which will use the first binary available in $PATH. | ||
env: [{name: ANSIBLE_SFTP_EXECUTABLE}] | ||
ini: | ||
- {key: sftp_executable, section: ssh_connection} | ||
version_added: "2.6" | ||
version_added: "2.0.0" | ||
vars: | ||
- name: ansible_sftp_executable | ||
version_added: "2.0.0" | ||
scp_executable: | ||
default: scp | ||
description: | ||
- This defines the location of the scp binary. It defaults to `scp` which will use the first binary available in $PATH. | ||
env: [{name: ANSIBLE_SCP_EXECUTABLE}] | ||
ini: | ||
- {key: scp_executable, section: ssh_connection} | ||
version_added: "2.6" | ||
version_added: "2.0.0" | ||
vars: | ||
- name: ansible_scp_executable | ||
version_added: "2.0.0" | ||
scp_extra_args: | ||
description: Extra exclusive to the ``scp`` CLI | ||
vars: | ||
- name: ansible_scp_extra_args | ||
env: | ||
- name: ANSIBLE_SCP_EXTRA_ARGS | ||
version_added: "2.0.0" | ||
ini: | ||
- key: scp_extra_args | ||
section: ssh_connection | ||
version_added: "2.0.0" | ||
sftp_extra_args: | ||
description: Extra exclusive to the ``sftp`` CLI | ||
vars: | ||
- name: ansible_sftp_extra_args | ||
env: | ||
- name: ANSIBLE_SFTP_EXTRA_ARGS | ||
version_added: "2.0.0" | ||
ini: | ||
- key: sftp_extra_args | ||
section: ssh_connection | ||
version_added: "2.0.0" | ||
ssh_extra_args: | ||
description: Extra exclusive to the 'ssh' CLI | ||
vars: | ||
- name: ansible_ssh_extra_args | ||
env: | ||
- name: ANSIBLE_SSH_EXTRA_ARGS | ||
version_added: "2.0.0" | ||
ini: | ||
- key: ssh_extra_args | ||
section: ssh_connection | ||
version_added: "2.0.0" | ||
retries: | ||
# constant: ANSIBLE_SSH_RETRIES | ||
description: Number of attempts to connect. | ||
default: 3 | ||
type: integer | ||
|
@@ -182,7 +160,6 @@ | |
key: retries | ||
vars: | ||
- name: ansible_ssh_retries | ||
version_added: "2.0.0" | ||
reconnection_retries: | ||
description: Number of attempts to connect. | ||
default: 0 | ||
|
@@ -196,7 +173,6 @@ | |
key: retries | ||
vars: | ||
- name: ansible_ssh_retries | ||
version_added: "2.0.0" | ||
port: | ||
description: Remote port to connect to. | ||
type: int | ||
|
@@ -232,12 +208,9 @@ | |
which is why this feature is disabled by default. | ||
env: | ||
- name: ANSIBLE_PIPELINING | ||
#- name: ANSIBLE_SSH_PIPELINING | ||
ini: | ||
- section: defaults | ||
key: pipelining | ||
#- section: ssh_connection | ||
# key: pipelining | ||
type: boolean | ||
vars: | ||
- name: ansible_pipelining | ||
|
@@ -264,7 +237,6 @@ | |
section: ssh_connection | ||
vars: | ||
- name: ansible_control_path | ||
version_added: "2.0.0" | ||
control_path_dir: | ||
default: ~/.ansible/cp | ||
description: | ||
|
@@ -277,7 +249,6 @@ | |
key: control_path_dir | ||
vars: | ||
- name: ansible_control_path_dir | ||
version_added: "2.0.0" | ||
sftp_batch_mode: | ||
default: 'yes' | ||
description: 'TODO: write it' | ||
|
@@ -287,7 +258,6 @@ | |
type: bool | ||
vars: | ||
- name: ansible_sftp_batch_mode | ||
version_added: "2.0.0" | ||
ssh_transfer_method: | ||
description: | ||
- "Preferred method to use when transferring files over ssh" | ||
|
@@ -308,9 +278,8 @@ | |
- {key: scp_if_ssh, section: ssh_connection} | ||
vars: | ||
- name: ansible_scp_if_ssh | ||
version_added: "2.0.0" | ||
use_tty: | ||
version_added: '2.5' | ||
version_added: '2.0.0' | ||
default: 'yes' | ||
description: add -tt to ssh commands to force tty allocation | ||
env: [{name: ANSIBLE_SSH_USETTY}] | ||
|
@@ -319,7 +288,6 @@ | |
type: bool | ||
vars: | ||
- name: ansible_ssh_use_tty | ||
version_added: "2.0.0" | ||
timeout: | ||
default: 10 | ||
description: | ||
|
@@ -328,16 +296,13 @@ | |
env: | ||
- name: ANSIBLE_TIMEOUT | ||
- name: ANSIBLE_SSH_TIMEOUT | ||
version_added: "2.0.0" | ||
ini: | ||
- key: timeout | ||
section: defaults | ||
- key: timeout | ||
section: ssh_connection | ||
version_added: "2.0.0" | ||
vars: | ||
- name: ansible_ssh_timeout | ||
version_added: "2.0.0" | ||
cli: | ||
- name: timeout | ||
type: integer | ||
|
@@ -351,7 +316,6 @@ | |
- name: ANSIBLE_PKCS11_PROVIDER | ||
vars: | ||
- name: ansible_pkcs11_provider | ||
version_added: "2.0.0" | ||
''' | ||
|
||
import codecs | ||
|
@@ -444,4 +408,4 @@ def _run(self, cmd, in_data, sudoable=True, checkrc=True): | |
def exec_command(self, cmd, in_data=None, sudoable=True): | ||
''' run a command on the remote host ''' | ||
|
||
return super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable) | ||
return super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable) |