diff options
author | Sviatoslav Sydorenko <webknjaz@redhat.com> | 2023-05-04 18:15:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 11:15:31 -0500 |
commit | 2b6d5536d7b300bab4a1afd3382536ef178fc432 (patch) | |
tree | 815dc4aadbeef567d5cf004ace393db829845b21 | |
parent | 8cd95a8e664ccd634dc3a95642ef7ad41f007169 (diff) | |
download | ansible-2b6d5536d7b300bab4a1afd3382536ef178fc432.tar.gz |
Fix docstrings RST markup in `ansible-console` CLI module (#80719)
* 📝🐛 Fix RST list @ `ansible-console` manpage
Said CLI entrypoint docstring is used to construct the corresponding
manpage. `docutils` were producing the following warning with the
current RST markup used there, as follows:
:36: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.
This change puts a portion of the first list entry on a separate line
which allows the RST parser stomach it without any problems and
produce correct output without gibberish in it.
* 🎨📝 Use RST inline code @ ansible-console doc
The single backtick syntax was causing things to be interpreted as
italics text. The inline code needs double backticks.
-rwxr-xr-x | lib/ansible/cli/console.py | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/lib/ansible/cli/console.py b/lib/ansible/cli/console.py index 18f38a4649..2325bf05d6 100755 --- a/lib/ansible/cli/console.py +++ b/lib/ansible/cli/console.py @@ -39,26 +39,30 @@ class ConsoleCLI(CLI, cmd.Cmd): ''' A REPL that allows for running ad-hoc tasks against a chosen inventory from a nice shell with built-in tab completion (based on dominis' - ansible-shell). + ``ansible-shell``). It supports several commands, and you can modify its configuration at runtime: - - `cd [pattern]`: change host/group (you can use host patterns eg.: app*.dc*:!app01*) - - `list`: list available hosts in the current path - - `list groups`: list groups included in the current path - - `become`: toggle the become flag - - `!`: forces shell module instead of the ansible module (!yum update -y) - - `verbosity [num]`: set the verbosity level - - `forks [num]`: set the number of forks - - `become_user [user]`: set the become_user - - `remote_user [user]`: set the remote_user - - `become_method [method]`: set the privilege escalation method - - `check [bool]`: toggle check mode - - `diff [bool]`: toggle diff mode - - `timeout [integer]`: set the timeout of tasks in seconds (0 to disable) - - `help [command/module]`: display documentation for the command or module - - `exit`: exit ansible-console + - ``cd [pattern]``: change host/group + (you can use host patterns eg.: ``app*.dc*:!app01*``) + - ``list``: list available hosts in the current path + - ``list groups``: list groups included in the current path + - ``become``: toggle the become flag + - ``!``: forces shell module instead of the ansible module + (``!yum update -y``) + - ``verbosity [num]``: set the verbosity level + - ``forks [num]``: set the number of forks + - ``become_user [user]``: set the become_user + - ``remote_user [user]``: set the remote_user + - ``become_method [method]``: set the privilege escalation method + - ``check [bool]``: toggle check mode + - ``diff [bool]``: toggle diff mode + - ``timeout [integer]``: set the timeout of tasks in seconds + (0 to disable) + - ``help [command/module]``: display documentation for + the command or module + - ``exit``: exit ``ansible-console`` ''' name = 'ansible-console' |