1
0
Fork 0
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:
Michael DeHaan 2012-08-09 07:27:22 -07:00
commit a7cd16a016
3 changed files with 29 additions and 12 deletions

View file

@ -36,11 +36,12 @@ 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':: *-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':: *-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*:: *-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*:: *-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':: *-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':: *-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 ENVIRONMENT
@ -113,6 +126,3 @@ SEE ALSO
Extensive documentation as well as IRC and mailing list info Extensive documentation as well as IRC and mailing list info
is available on the ansible home page: <https://ansible.github.com/> is available on the ansible home page: <https://ansible.github.com/>

View file

@ -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. 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':: *-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. 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':: *-c* 'CONNECTION', *--connection=*'CONNECTION'::
Connection type to use. Possible options are 'paramiko' (SSH) and 'local'. Connection type to use. Possible options are 'paramiko' (SSH), 'ssh',
Local is mostly useful for crontab or kickstarts. and 'local'. 'local' is mostly useful for crontab or kickstarts.
INVENTORY INVENTORY

View file

@ -42,7 +42,7 @@ class LocalConnection(object):
# NOTE: if someone wants to add sudo w/ password to the local connection type, they are welcome # 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 # 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 # 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) cmd = "sudo -u {0} -s {1}".format(sudo_user, cmd)
vvv("EXEC %s" % cmd, host=self.host) vvv("EXEC %s" % cmd, host=self.host)