-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1114 from moreati/ansible_ssh_password
`ansible_ssh_password` support
- Loading branch information
Showing
11 changed files
with
96 additions
and
27 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 |
---|---|---|
|
@@ -32,35 +32,20 @@ | |
import os.path | ||
import sys | ||
|
||
from ansible.plugins.connection.ssh import ( | ||
DOCUMENTATION as _ansible_ssh_DOCUMENTATION, | ||
) | ||
|
||
DOCUMENTATION = """ | ||
name: mitogen_ssh | ||
author: David Wilson <[email protected]> | ||
connection: mitogen_ssh | ||
short_description: Connect over SSH via Mitogen | ||
description: | ||
- This connects using an OpenSSH client controlled by the Mitogen for | ||
Ansible extension. It accepts every option the vanilla ssh plugin | ||
accepts. | ||
version_added: "2.5" | ||
options: | ||
ssh_args: | ||
type: str | ||
vars: | ||
- name: ssh_args | ||
- name: ansible_ssh_args | ||
- name: ansible_mitogen_ssh_args | ||
ssh_common_args: | ||
type: str | ||
vars: | ||
- name: ssh_args | ||
- name: ansible_ssh_common_args | ||
- name: ansible_mitogen_ssh_common_args | ||
ssh_extra_args: | ||
type: str | ||
vars: | ||
- name: ssh_args | ||
- name: ansible_ssh_extra_args | ||
- name: ansible_mitogen_ssh_extra_args | ||
""" | ||
""" + _ansible_ssh_DOCUMENTATION.partition('options:\n')[2] | ||
|
||
try: | ||
import ansible_mitogen | ||
|
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- name: integration/ssh/templated_by_inv.yml | ||
hosts: tt_targets_inventory | ||
gather_facts: false | ||
tasks: | ||
- meta: reset_connection | ||
- name: Templated variables in inventory | ||
ping: |
10 changes: 10 additions & 0 deletions
10
tests/ansible/integration/ssh/templated_by_play_taskvar.yml
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- name: integration/ssh/templated_by_play_taskvar.yml | ||
hosts: tt_targets_bare | ||
gather_facts: false | ||
vars: | ||
ansible_password: "{{ 'has_sudo_nopw_password' | trim }}" | ||
|
||
tasks: | ||
- meta: reset_connection | ||
- name: Templated variables in play | ||
ping: |
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