Skip to content

Commit

Permalink
docsite: remove lexers which have been fixed in Pygments 2.4.0 (ansib…
Browse files Browse the repository at this point in the history
…le#57508)

* Remove lexers which have been fixed in Pygments 2.4.0.
* Add Pygments >= 2.4.0 to test runner.
* Fix pages that triggered lexer errors.

Co-Authored-By: Sviatoslav Sydorenko <[email protected]>
  • Loading branch information
2 people authored and acozine committed Jun 18, 2019
1 parent cae6304 commit 505c992
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 533 deletions.
523 changes: 0 additions & 523 deletions docs/docsite/_extensions/pygments_lexer.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/docsite/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ PyYAML
rstcheck
sphinx
sphinx-notfound-page
Pygments >= 2.4.0
2 changes: 1 addition & 1 deletion docs/docsite/rst/user_guide/playbooks_loops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Comparing ``loop`` and ``with_*``
you would need::

loop: [1, [2,3] ,4] | flatten(1)
loop: "{{ [1, [2,3] ,4] | flatten(1) }}"

* Any ``with_*`` statement that requires using ``lookup`` within a loop should not be converted to use the ``loop`` keyword. For example, instead of doing:

Expand Down
4 changes: 3 additions & 1 deletion docs/docsite/rst/user_guide/windows_dsc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ fail if the option name is incorrect, a mandatory option is not set, or the
value is not a valid choice. When running Ansible with a verbosity level of 3
or more (``-vvv``), the return value will contain the possible invocation
options based on the ``resource_name`` specified. Here is an example of the
invocation output for the above ``Registry`` task::
invocation output for the above ``Registry`` task:

.. code-block:: ansible-output
changed: [2016] => {
"changed": true,
Expand Down
11 changes: 7 additions & 4 deletions docs/docsite/rst/user_guide/windows_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,7 @@ The YAML specification considers the following `escape sequences <http://yaml.or

* ``\U........`` -- 8-digit hex escape

Here are some examples on how to write Windows paths:

.. code-block:: yaml+jinja
Here are some examples on how to write Windows paths::

# GOOD
tempdir: C:\Windows\Temp
Expand All @@ -418,11 +416,16 @@ Here are some examples on how to write Windows paths:
tempdir: 'C:\\Windows\\Temp'
tempdir: C:/Windows/Temp

This is an example which will fail:

.. code-block:: text
# FAILS
tempdir: "C:\Windows\Temp"
This example shows the use of single quotes when they are required::

---
# Example of single quotes when they are required
- name: Copy tomcat config
win_copy:
src: log4j.xml
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/plugins/lookup/passwordstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
msg: "{{ lookup('passwordstore', 'example/test create=true overwrite=true')}}"
- name: Create an alphanumeric password
debug: msg="{{ lookup('passwordstore', 'example/test create=true nosymbols=true) }}"
debug: msg="{{ lookup('passwordstore', 'example/test create=true nosymbols=true') }}"
- name: Return the value for user in the KV pair user, username
debug:
Expand Down
8 changes: 5 additions & 3 deletions lib/ansible/plugins/lookup/skydive.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@
EXAMPLES = r"""
- name: return skydive metdata if present based on Name
set_fact:
skydive_meta: "{{ lookup('skydive', filter={'query': \"G.V().Has('Name', 'sumit-VirtualBox')\"}) }}"
skydive_meta: >-
{{ lookup('skydive', filter={'query': "G.V().Has('Name', 'sumit-VirtualBox')"}) }}
- name: return all the skydive metdata having parameter Name
set_fact:
skydive: "{{ lookup('skydive', filter={'query': \"G.V().Has('Name')\"},
provider={'endpoint': 'localhost:8082', 'username': 'admin', 'password': 'password'}) }}"
skydive: >-
{{ lookup('skydive', filter={'query': "G.V().Has('Name')"},
provider={'endpoint': 'localhost:8082', 'username': 'admin', 'password': 'password'}) }}
"""

RETURN = """
Expand Down
1 change: 1 addition & 0 deletions test/runner/requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ urllib3 < 1.24 ; python_version < '2.7' # urllib3 1.24 and later require python
pywinrm >= 0.3.0 # message encryption support
sphinx < 1.6 ; python_version < '2.7' # sphinx 1.6 and later require python 2.7 or later
sphinx < 1.8 ; python_version >= '2.7' # sphinx 1.8 and later are currently incompatible with rstcheck 3.3
pygments >= 2.4.0 # Pygments 2.4.0 includes bugfixes for YAML and YAML+Jinja lexers
wheel < 0.30.0 ; python_version < '2.7' # wheel 0.30.0 and later require python 2.7 or later
yamllint != 1.8.0, < 1.14.0 ; python_version < '2.7' # yamllint 1.8.0 and 1.14.0+ require python 2.7+
pycrypto >= 2.6 # Need features found in 2.6 and greater
Expand Down

0 comments on commit 505c992

Please sign in to comment.