mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-21 01:25:49 +02:00
Update yamllint config, fix YAML.
Some checks failed
Collection Docs / Build Ansible Docs (push) Has been cancelled
execution environment / Build and test EE (ansible-core devel @ RHEL UBI 9) (push) Has been cancelled
execution environment / Build and test EE (ansible-core 2.15 @ Rocky Linux 9) (push) Has been cancelled
nox / Run extra sanity tests (push) Has been cancelled
nox / ansible-test (push) Has been cancelled
Collection Docs / Publish Ansible Docs (push) Has been cancelled
Some checks failed
Collection Docs / Build Ansible Docs (push) Has been cancelled
execution environment / Build and test EE (ansible-core devel @ RHEL UBI 9) (push) Has been cancelled
execution environment / Build and test EE (ansible-core 2.15 @ Rocky Linux 9) (push) Has been cancelled
nox / Run extra sanity tests (push) Has been cancelled
nox / ansible-test (push) Has been cancelled
Collection Docs / Publish Ansible Docs (push) Has been cancelled
This commit is contained in:
parent
aa83116c78
commit
b751d79a98
4 changed files with 68 additions and 14 deletions
53
.yamllint-extra-docs
Normal file
53
.yamllint-extra-docs
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
---
|
||||||
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
# SPDX-FileCopyrightText: 2025 Felix Fontein <felix@fontein.de>
|
||||||
|
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
ignore: |
|
||||||
|
/changelogs/
|
||||||
|
|
||||||
|
rules:
|
||||||
|
line-length:
|
||||||
|
max: 160
|
||||||
|
level: error
|
||||||
|
document-start: disable
|
||||||
|
document-end:
|
||||||
|
present: false
|
||||||
|
truthy:
|
||||||
|
level: error
|
||||||
|
allowed-values:
|
||||||
|
- 'true'
|
||||||
|
- 'false'
|
||||||
|
indentation:
|
||||||
|
spaces: 2
|
||||||
|
indent-sequences: true
|
||||||
|
key-duplicates: enable
|
||||||
|
trailing-spaces: enable
|
||||||
|
new-line-at-end-of-file: disable
|
||||||
|
hyphens:
|
||||||
|
max-spaces-after: 1
|
||||||
|
empty-lines:
|
||||||
|
max: 2
|
||||||
|
max-start: 0
|
||||||
|
max-end: 0
|
||||||
|
commas:
|
||||||
|
max-spaces-before: 0
|
||||||
|
min-spaces-after: 1
|
||||||
|
max-spaces-after: 1
|
||||||
|
colons:
|
||||||
|
max-spaces-before: 0
|
||||||
|
max-spaces-after: 1
|
||||||
|
brackets:
|
||||||
|
min-spaces-inside: 0
|
||||||
|
max-spaces-inside: 0
|
||||||
|
braces:
|
||||||
|
min-spaces-inside: 0
|
||||||
|
max-spaces-inside: 1
|
||||||
|
octal-values:
|
||||||
|
forbid-implicit-octal: true
|
||||||
|
forbid-explicit-octal: true
|
||||||
|
comments:
|
||||||
|
min-spaces-from-content: 1
|
||||||
|
comments-indentation: false
|
|
@ -18,6 +18,7 @@ run_yamllint = true
|
||||||
yamllint_config = ".yamllint"
|
yamllint_config = ".yamllint"
|
||||||
yamllint_config_plugins = ".yamllint-docs"
|
yamllint_config_plugins = ".yamllint-docs"
|
||||||
yamllint_config_plugins_examples = ".yamllint-examples"
|
yamllint_config_plugins_examples = ".yamllint-examples"
|
||||||
|
yamllint_config_extra_docs = ".yamllint-extra-docs"
|
||||||
run_mypy = false
|
run_mypy = false
|
||||||
|
|
||||||
[sessions.docs_check]
|
[sessions.docs_check]
|
||||||
|
|
|
@ -191,7 +191,7 @@ When this playbook completed successfully, you should be able to use the HTTPS a
|
||||||
.. code-block:: yaml+jinja
|
.. code-block:: yaml+jinja
|
||||||
|
|
||||||
- community.routeros.api:
|
- community.routeros.api:
|
||||||
...
|
# ...
|
||||||
tls: true
|
tls: true
|
||||||
validate_certs: true
|
validate_certs: true
|
||||||
validate_cert_hostname: true
|
validate_cert_hostname: true
|
||||||
|
|
|
@ -66,22 +66,22 @@ With the above inventory, you can use the following playbook to execute ``/syste
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Gather system resources
|
- name: Gather system resources
|
||||||
community.routeros.command:
|
community.routeros.command:
|
||||||
commands:
|
commands:
|
||||||
- /system resource print
|
- /system resource print
|
||||||
register: system_resource_print
|
register: system_resource_print
|
||||||
|
|
||||||
- name: Show system resources
|
- name: Show system resources
|
||||||
debug:
|
debug:
|
||||||
var: system_resource_print.stdout_lines
|
var: system_resource_print.stdout_lines
|
||||||
|
|
||||||
- name: Gather facts
|
- name: Gather facts
|
||||||
community.routeros.facts:
|
community.routeros.facts:
|
||||||
|
|
||||||
- name: Show a fact
|
- name: Show a fact
|
||||||
debug:
|
debug:
|
||||||
msg: "First IP address: {{ ansible_net_all_ipv4_addresses[0] }}"
|
msg: "First IP address: {{ ansible_net_all_ipv4_addresses[0] }}"
|
||||||
|
|
||||||
This results in the following output:
|
This results in the following output:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue