Fix linting errors.

This commit is contained in:
Felix Fontein 2025-04-26 09:21:32 +02:00
parent 3af45c33f1
commit 08152376de
17 changed files with 23 additions and 8 deletions

View file

@ -7,7 +7,7 @@ name: Collection Docs
concurrency:
group: docs-pr-${{ github.head_ref }}
cancel-in-progress: true
on:
'on':
pull_request_target:
types: [opened, synchronize, reopened, closed]

View file

@ -7,7 +7,7 @@ name: Collection Docs
concurrency:
group: docs-push-${{ github.sha }}
cancel-in-progress: true
on:
'on':
push:
branches:
- main

View file

@ -4,7 +4,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
name: execution environment
on:
'on':
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests
push:
branches:

View file

@ -16,7 +16,7 @@ authors:
description: Modules and plugins for MikroTik RouterOS
license:
- GPL-3.0-or-later
#license_file: COPYING
# license_file: COPYING
tags:
- network
- mikrotik

View file

@ -20,6 +20,7 @@ DOCUMENTATION:
- Felix Fontein (@felixfontein)
EXAMPLES: |
---
- name: Join arguments for a RouterOS CLI command
ansible.builtin.set_fact:
arguments: "{{ ['foo=bar', 'comment=foo is bar'] | community.routeros.join }}"

View file

@ -30,6 +30,7 @@ DOCUMENTATION:
- Felix Fontein (@felixfontein)
EXAMPLES: |
---
- name: Convert a list to a dictionary
ansible.builtin.set_fact:
dictionary: "{{ ['foo=bar', 'comment=foo is bar'] | community.routeros.list_to_dict }}"

View file

@ -19,9 +19,11 @@ DOCUMENTATION:
- Felix Fontein (@felixfontein)
EXAMPLES: |
---
- name: Quote a RouterOS CLI command argument
ansible.builtin.set_fact:
quoted: "{{ 'comment=this is a "comment"' | community.routeros.quote_argument }}"
quoted: >-
{{ 'comment=this is a "comment"' | community.routeros.quote_argument }}
# Should result in 'comment="this is a \"comment\""'
RETURN:

View file

@ -19,9 +19,11 @@ DOCUMENTATION:
- Felix Fontein (@felixfontein)
EXAMPLES: |
---
- name: Quote a RouterOS CLI command argument's value
ansible.builtin.set_fact:
quoted: "{{ 'this is a "comment"' | community.routeros.quote_argument_value }}"
quoted: >-
{{ 'this is a "comment"' | community.routeros.quote_argument_value }}
# Should result in '"this is a \"comment\""'
RETURN:

View file

@ -19,9 +19,11 @@ DOCUMENTATION:
- Felix Fontein (@felixfontein)
EXAMPLES: |
---
- name: Split command into list of arguments
ansible.builtin.set_fact:
argument_list: "{{ 'foo=bar comment="foo is bar" baz' | community.routeros.split }}"
argument_list: >-
{{ 'foo=bar comment="foo is bar" baz' | community.routeros.split }}
# Should result in ['foo=bar', 'comment=foo is bar', 'baz']
RETURN:

View file

@ -164,6 +164,7 @@ seealso:
"""
EXAMPLES = r"""
---
- name: Get example - ip address print
community.routeros.api:
hostname: "{{ hostname }}"

View file

@ -55,6 +55,7 @@ seealso:
"""
EXAMPLES = r"""
---
- name: Collect all facts from the device
community.routeros.api_facts:
hostname: 192.168.88.1

View file

@ -83,6 +83,7 @@ seealso:
"""
EXAMPLES = r"""
---
- name: Rename bridge from 'bridge' to 'my-bridge'
community.routeros.api_find_and_modify:
hostname: "{{ hostname }}"

View file

@ -324,6 +324,7 @@ seealso:
"""
EXAMPLES = r"""
---
- name: Get IP addresses
community.routeros.api_info:
hostname: "{{ hostname }}"

View file

@ -360,6 +360,7 @@ seealso:
"""
EXAMPLES = r"""
---
- name: Setup DHCP server networks
# Ensures that we have exactly two DHCP server networks (in the specified order)
community.routeros.api_modify:

View file

@ -77,6 +77,7 @@ seealso:
"""
EXAMPLES = r"""
---
- name: Run command on remote devices
community.routeros.command:
commands: /system routerboard print

View file

@ -42,6 +42,7 @@ seealso:
"""
EXAMPLES = r"""
---
- name: Collect all facts from the device
community.routeros.facts:
gather_subset: all

View file

@ -4,4 +4,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
collections:
- ansible.netcommon
- ansible.netcommon