mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #818 from tbielawa/smallfixes
Update man pages and the message for an exception.
This commit is contained in:
commit
a7cd16a016
3 changed files with 29 additions and 12 deletions
|
@ -34,13 +34,14 @@ The names of one or more YAML format files to run as ansible playbooks.
|
|||
OPTIONS
|
||||
-------
|
||||
|
||||
*-v*, *--verbose*
|
||||
*-v*, *--verbose*
|
||||
|
||||
Verbose mode, more output from successful actions will be shown
|
||||
Verbose mode, more output from successful actions will be shown.
|
||||
|
||||
*-i* 'PATH', *--inventory=*'PATH'::
|
||||
|
||||
The 'PATH' to the inventory hosts file, which defaults to '/etc/ansible/hosts'.
|
||||
The 'PATH' to the inventory hosts file, which defaults to
|
||||
'/etc/ansible/hosts'.
|
||||
|
||||
|
||||
*-M* 'DIRECTORY', *--module-path=*'DIRECTORY'::
|
||||
|
@ -58,13 +59,18 @@ Level of parallelism. 'NUM' is specified as an integer, the default is 5.
|
|||
|
||||
*-k*, *--ask-pass*::
|
||||
|
||||
Prompt for the SSH password instead of assuming key-based authentication with ssh-agent.
|
||||
Prompt for the SSH password instead of assuming key-based
|
||||
authentication with ssh-agent.
|
||||
|
||||
|
||||
*-K*, *--ask-sudo-pass*::
|
||||
|
||||
Prompt for the password to use for playbook plays that request sudo access, if any
|
||||
Prompt for the password to use for playbook plays that request sudo
|
||||
access, if any.
|
||||
|
||||
*-U*, 'SUDO_USER', *--sudo-user=*'SUDO_USER'::
|
||||
|
||||
Desired sudo user (default=root).
|
||||
|
||||
*-T* 'SECONDS', *--timeout=*'SECONDS'::
|
||||
|
||||
|
@ -78,7 +84,14 @@ Force all plays to use sudo, even if not marked as such.
|
|||
|
||||
*-u* 'USERNAME', *--remote-user=*'USERNAME'::
|
||||
|
||||
Use this remote user name on playbook steps that do not indicate a user name to run as.
|
||||
Use this remote user name on playbook steps that do not indicate a
|
||||
user name to run as.
|
||||
|
||||
*-c* 'CONNECTION', *--connection=*'CONNECTION'::
|
||||
|
||||
Connection type to use. Possible options are 'paramiko' (SSH), 'ssh',
|
||||
and 'local'. 'local' is mostly useful for crontab or kickstarts.
|
||||
|
||||
|
||||
|
||||
ENVIRONMENT
|
||||
|
@ -113,6 +126,3 @@ SEE ALSO
|
|||
|
||||
Extensive documentation as well as IRC and mailing list info
|
||||
is available on the ansible home page: <https://ansible.github.com/>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -44,6 +44,10 @@ The 'PATH' to the inventory hosts file, which defaults to '/etc/ansible/hosts'.
|
|||
|
||||
Level of parallelism. 'NUM' is specified as an integer, the default is 5.
|
||||
|
||||
*--private-key=*'PRIVATE_KEY_FILE'::
|
||||
|
||||
Use this file to authenticate the connection.
|
||||
|
||||
|
||||
*-m* 'NAME', *--module-name=*'NAME'::
|
||||
|
||||
|
@ -100,10 +104,13 @@ Use this remote 'USERNAME' instead of root.
|
|||
|
||||
Sudo to 'SUDO_USERNAME' instead of root. Implies --sudo.
|
||||
|
||||
*--private-key=*'PRIVATE_KEY_FILE'::
|
||||
Use this file to authenticate the connection.
|
||||
|
||||
*-c* 'CONNECTION', *--connection=*'CONNECTION'::
|
||||
|
||||
Connection type to use. Possible options are 'paramiko' (SSH) and 'local'.
|
||||
Local is mostly useful for crontab or kickstarts.
|
||||
Connection type to use. Possible options are 'paramiko' (SSH), 'ssh',
|
||||
and 'local'. 'local' is mostly useful for crontab or kickstarts.
|
||||
|
||||
|
||||
INVENTORY
|
||||
|
|
|
@ -42,7 +42,7 @@ class LocalConnection(object):
|
|||
# NOTE: if someone wants to add sudo w/ password to the local connection type, they are welcome
|
||||
# to do so. The primary usage of the local connection is for crontab and kickstart usage however
|
||||
# so this doesn't seem to be a huge priority
|
||||
raise errors.AnsibleError("sudo with password is presently only supported on the paramiko (SSH) connection type")
|
||||
raise errors.AnsibleError("sudo with password is presently only supported on the 'paramiko' (SSH) and native 'ssh' connection types")
|
||||
cmd = "sudo -u {0} -s {1}".format(sudo_user, cmd)
|
||||
|
||||
vvv("EXEC %s" % cmd, host=self.host)
|
||||
|
|
Loading…
Reference in a new issue