From bf7e83bea67bede884d6cf7f29e111ab56c9bdb1 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Thu, 5 Jul 2012 22:21:57 -0400 Subject: [PATCH] Update man pages and the message for an exception. --- docs/man/man1/ansible-playbook.1.asciidoc.in | 28 +++++++++++++------- docs/man/man1/ansible.1.asciidoc.in | 11 ++++++-- lib/ansible/runner/connection/local.py | 2 +- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/docs/man/man1/ansible-playbook.1.asciidoc.in b/docs/man/man1/ansible-playbook.1.asciidoc.in index 377dcef53261b5..a1aff4e2f6e632 100644 --- a/docs/man/man1/ansible-playbook.1.asciidoc.in +++ b/docs/man/man1/ansible-playbook.1.asciidoc.in @@ -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: - - - diff --git a/docs/man/man1/ansible.1.asciidoc.in b/docs/man/man1/ansible.1.asciidoc.in index 2e6f8bbb451150..62a61815506f9a 100644 --- a/docs/man/man1/ansible.1.asciidoc.in +++ b/docs/man/man1/ansible.1.asciidoc.in @@ -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 diff --git a/lib/ansible/runner/connection/local.py b/lib/ansible/runner/connection/local.py index 130cdfd33f7090..c0ddb5084224dc 100644 --- a/lib/ansible/runner/connection/local.py +++ b/lib/ansible/runner/connection/local.py @@ -42,7 +42,7 @@ def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False): # 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)