mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix bash code block formatting
This commit is contained in:
parent
f733e048c9
commit
c1420711db
1 changed files with 22 additions and 23 deletions
|
@ -118,24 +118,23 @@ The token may be sent in one of two ways:
|
|||
|
||||
For example, using curl:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
curl -sSk https://localhost:8000/login \
|
||||
-H 'Accept: application/x-yaml' \
|
||||
-d username=saltdev \
|
||||
-d password=saltdev \
|
||||
curl -sSk https://localhost:8000/login \\
|
||||
-H 'Accept: application/x-yaml' \\
|
||||
-d username=saltdev \\
|
||||
-d password=saltdev \\
|
||||
-d eauth=auto
|
||||
|
||||
Copy the ``token`` value from the output and include it in subsequent
|
||||
requests:
|
||||
Copy the ``token`` value from the output and include it in subsequent requests:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
curl -sSk https://localhost:8000 \
|
||||
-H 'Accept: application/x-yaml' \
|
||||
-H 'X-Auth-Token: 697adbdc8fe971d09ae4c2a3add7248859c87079'\
|
||||
-d client=local \
|
||||
-d tgt='*' \
|
||||
curl -sSk https://localhost:8000 \\
|
||||
-H 'Accept: application/x-yaml' \\
|
||||
-H 'X-Auth-Token: 697adbdc8fe971d09ae4c2a3add7248859c87079'\\
|
||||
-d client=local \\
|
||||
-d tgt='*' \\
|
||||
-d fun=test.ping
|
||||
|
||||
* Sent via a cookie. This option is a convenience for HTTP clients that
|
||||
|
@ -146,19 +145,19 @@ The token may be sent in one of two ways:
|
|||
.. code-block:: bash
|
||||
|
||||
# Write the cookie file:
|
||||
curl -sSk https://localhost:8000/login \
|
||||
-c ~/cookies.txt \
|
||||
-H 'Accept: application/x-yaml' \
|
||||
-d username=saltdev \
|
||||
-d password=saltdev \
|
||||
curl -sSk https://localhost:8000/login \\
|
||||
-c ~/cookies.txt \\
|
||||
-H 'Accept: application/x-yaml' \\
|
||||
-d username=saltdev \\
|
||||
-d password=saltdev \\
|
||||
-d eauth=auto
|
||||
|
||||
# Read the cookie file:
|
||||
curl -sSk https://localhost:8000 \
|
||||
-b ~/cookies.txt \
|
||||
-H 'Accept: application/x-yaml' \
|
||||
-d client=local \
|
||||
-d tgt='*' \
|
||||
curl -sSk https://localhost:8000 \\
|
||||
-b ~/cookies.txt \\
|
||||
-H 'Accept: application/x-yaml' \\
|
||||
-d client=local \\
|
||||
-d tgt='*' \\
|
||||
-d fun=test.ping
|
||||
|
||||
.. seealso:: You can bypass the session handling via the :py:class:`Run` URL.
|
||||
|
|
Loading…
Add table
Reference in a new issue