Skip to content

Commit e0508d9

Browse files
oraNodganeshhubalewebknjazfelixfontein
authored andcommitted
Update RST files to specify codeblock language attributes (ansible#2382)
* Update RST files to specify codeblock language attributes Co-authored-by: Ganesh Hubale <[email protected]> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Felix Fontein <[email protected]> * change lexer names to fix ci * yaml is yaml not ini * Update docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst Co-authored-by: Felix Fontein <[email protected]> * yamllint codeblock * Update docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst Co-authored-by: Felix Fontein <[email protected]> * yamlgit add . * Update docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst Co-authored-by: Felix Fontein <[email protected]> * Update docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst Co-authored-by: Felix Fontein <[email protected]> * Update docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst Co-authored-by: Felix Fontein <[email protected]> * Update docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst Co-authored-by: Felix Fontein <[email protected]> * Update docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst Co-authored-by: Felix Fontein <[email protected]> * Update docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> * Update docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> * Update docs/docsite/rst/dev_guide/developing_collections_creating.rst Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> * Update docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> * Update docs/docsite/rst/os_guide/intro_bsd.rst Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> --------- Co-authored-by: Ganesh Hubale <[email protected]> Co-authored-by: Ganesh Hubale <[email protected]> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Felix Fontein <[email protected]>
1 parent 9ffd4a7 commit e0508d9

File tree

11 files changed

+97
-98
lines changed

11 files changed

+97
-98
lines changed

docs/docsite/rst/collections_guide/collections_using_playbooks.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Once installed, you can reference a collection content by its fully qualified co
1818
1919
This works for roles or any type of plugin distributed within the collection:
2020

21-
.. code-block:: yaml
21+
.. code-block:: yaml+jinja
2222

2323
- name: Reference collections contents using their FQCNs
2424
hosts: all
@@ -64,7 +64,7 @@ Using ``collections`` in playbooks
6464

6565
In a playbook, you can control the collections Ansible searches for modules and action plugins to execute. However, any roles you call in your playbook define their own collections search order; they do not inherit the calling playbook's settings. This is true even if the role does not define its own ``collections`` keyword.
6666

67-
.. code-block:: yaml
67+
.. code-block:: yaml+jinja
6868

6969
- name: Run a play using the collections keyword
7070
hosts: all
@@ -116,7 +116,7 @@ From inside a playbook:
116116
117117
A few recommendations when creating such playbooks, ``hosts:`` should be generic or at least have a variable input.
118118

119-
.. code-block:: yaml
119+
.. code-block:: yaml+jinja
120120

121121
- hosts: all # Use --limit or customized inventory to restrict hosts targeted
122122

docs/docsite/rst/dev_guide/developing_collections_creating.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ A collection skeleton is a directory that looks like a collection directory but
9090

9191
An example ``galaxy.yml.j2`` file that accepts an optional dictionary variable ``dependencies`` could look like this:
9292

93-
.. code-block:: yaml
93+
.. code-block:: yaml+jinja
9494

9595
namespace: {{ namespace }}
9696
name: {{ collection_name }}

docs/docsite/rst/dev_guide/developing_collections_distributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ For example, to exclude the :file:`sensitive` folder within the ``playbooks`` fo
220220
221221
By default, the ``MANIFEST.in`` style directives would exclude all files by default, but there are default directives in place. Those default directives are described below. To see the directives in use during build, pass ``-vvv`` with the ``ansible-galaxy collection build`` command.
222222

223-
.. code-block::
223+
.. code-block:: text
224224
225225
include meta/*.yml
226226
include *.txt *.md *.rst COPYING LICENSE

docs/docsite/rst/inventory_guide/intro_patterns.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Slicing at specific items
179179

180180
If *i* is negative, the index is relative to the end of sequence *s*: ``len(s) + i`` is substituted. However ``-0`` is ``0``.
181181

182-
.. code-block:: yaml
182+
.. code-block:: python
183183

184184
webservers[0] # == cobweb
185185
webservers[-1] # == weber
@@ -198,7 +198,7 @@ If *i* is greater than *j*, the slice is empty.
198198
If *i* is equal to *j*, the *s[i]* is substituted.
199199

200200

201-
.. code-block:: yaml
201+
.. code-block:: python
202202

203203
webservers[0:2] # == webservers[0],webservers[1],webservers[2]
204204
# == cobweb,webbing,weber

docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst

Lines changed: 53 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -558,69 +558,66 @@ The following example walks through the integration tests for the ``vyos.vyos.vy
558558
559559
``test/integration/targets/vyos_l3_interfaces/tests/cli/overridden.yaml``
560560

561-
.. code-block:: yaml
561+
.. code-block:: yaml+jinja
562562

563563
---
564-
- debug:
565-
msg: START vyos_l3_interfaces merged integration tests on connection={{ ansible_connection
566-
}}
564+
- debug: null
565+
msg: START vyos_l3_interfaces merged integration tests on connection={{ ansible_connection }}
567566

568567
- import_tasks: _remove_config.yaml
569568

570569
- block:
571-
572-
- import_tasks: _populate.yaml
573-
574-
- name: Overrides all device configuration with provided configuration
575-
register: result
576-
vyos.vyos.vyos_l3_interfaces: &id001
577-
config:
578-
579-
- name: eth0
580-
ipv4:
581-
582-
- address: dhcp
583-
584-
- name: eth1
585-
ipv4:
586-
587-
- address: 192.0.2.15/24
588-
state: overridden
589-
590-
- name: Assert that before dicts were correctly generated
591-
assert:
592-
that:
593-
- "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
594-
595-
- name: Assert that correct commands were generated
596-
assert:
597-
that:
598-
- "{{ overridden['commands'] | symmetric_difference(result['commands'])\
599-
\ |length == 0 }}"
600-
601-
- name: Assert that after dicts were correctly generated
602-
assert:
603-
that:
604-
- "{{ overridden['after'] | symmetric_difference(result['after']) |length\
605-
\ == 0 }}"
606-
607-
- name: Overrides all device configuration with provided configurations (IDEMPOTENT)
608-
register: result
609-
vyos.vyos.vyos_l3_interfaces: *id001
610-
611-
- name: Assert that the previous task was idempotent
612-
assert:
613-
that:
614-
- result['changed'] == false
615-
616-
- name: Assert that before dicts were correctly generated
617-
assert:
618-
that:
619-
- "{{ overridden['after'] | symmetric_difference(result['before']) |length\
620-
\ == 0 }}"
570+
- import_tasks: _populate.yaml
571+
- name: Overrides all device configuration with provided configuration
572+
register: result
573+
vyos.vyos.vyos_l3_interfaces:
574+
config:
575+
- name: eth0
576+
ipv4:
577+
- address: dhcp
578+
- name: eth1
579+
ipv4:
580+
- address: 192.0.2.15/24
581+
state: overridden
582+
- name: Assert that before dicts were correctly generated
583+
assert:
584+
that:
585+
- "{{ populate | symmetric_difference(result['before']) | length == 0 }}"
586+
- name: Assert that correct commands were generated
587+
assert:
588+
that:
589+
- >-
590+
overridden['commands']
591+
| symmetric_difference(result['commands'])
592+
| length
593+
== 0
594+
- name: Assert that after dicts were correctly generated
595+
assert:
596+
that:
597+
- "{{ overridden['after'] | symmetric_difference(result['after'])
598+
| length == 0 }}"
599+
- name: Override device configuration with provided configuration (IDEMPOTENT)
600+
register: result
601+
vyos.vyos.vyos_l3_interfaces:
602+
config:
603+
- name: eth0
604+
ipv4:
605+
- address: dhcp
606+
- name: eth1
607+
ipv4:
608+
- address: 192.0.2.15/24
609+
state: overridden
610+
- name: Assert that the previous task was idempotent
611+
assert:
612+
that:
613+
- result is not changed
614+
- name: Assert that before dicts were correctly generated
615+
assert:
616+
that:
617+
- "{{ overridden['after'] | symmetric_difference(result['before'])
618+
| length == 0 }}"
621619
always:
622-
623-
- import_tasks: _remove_config.yaml
620+
- import_tasks: _remove_config.yaml
624621

625622

626623
Detecting test resources at runtime

0 commit comments

Comments
 (0)