diff options
Diffstat (limited to 'plugins/modules/vyos_logging.py')
| -rw-r--r-- | plugins/modules/vyos_logging.py | 47 | 
1 files changed, 26 insertions, 21 deletions
| diff --git a/plugins/modules/vyos_logging.py b/plugins/modules/vyos_logging.py index 6c2f9f7a..9f81eb9e 100644 --- a/plugins/modules/vyos_logging.py +++ b/plugins/modules/vyos_logging.py @@ -25,42 +25,45 @@ ANSIBLE_METADATA = {      "supported_by": "network",  } -DOCUMENTATION = """ ---- -module: vyos_logging -version_added: "2.4" -author: "Trishna Guha (@trishnaguha)" +DOCUMENTATION = """module: vyos_logging +author: Trishna Guha (@trishnaguha)  short_description: Manage logging on network devices  description: -  - This module provides declarative management of logging -    on Vyatta Vyos devices. +- This module provides declarative management of logging on Vyatta Vyos devices.  notes: -  - Tested against VyOS 1.1.8 (helium). -  - This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html). +- Tested against VyOS 1.1.8 (helium). +- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).  options:    dest:      description: -      - Destination of the logs. -    choices: ['console', 'file', 'global', 'host', 'user'] +    - Destination of the logs. +    choices: +    - console +    - file +    - global +    - host +    - user    name:      description: -      - If value of C(dest) is I(file) it indicates file-name, -        for I(user) it indicates username and for I(host) indicates -        the host name to be notified. +    - If value of C(dest) is I(file) it indicates file-name, for I(user) it indicates +      username and for I(host) indicates the host name to be notified.    facility:      description: -      - Set logging facility. +    - Set logging facility.    level:      description: -      - Set logging severity levels. +    - Set logging severity levels.    aggregate:      description: List of logging definitions.    state:      description: -      - State of the logging configuration. +    - State of the logging configuration.      default: present -    choices: ['present', 'absent'] -extends_documentation_fragment: vyos +    choices: +    - present +    - absent +extends_documentation_fragment: +- vyos.vyos.vyos  """  EXAMPLES = """ @@ -112,7 +115,9 @@ import re  from copy import deepcopy  from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.network.common.utils import remove_default_spec +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import ( +    remove_default_spec, +)  from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.vyos import (      get_config,      load_config, @@ -252,7 +257,7 @@ def main():      remove_default_spec(aggregate_spec)      argument_spec = dict( -        aggregate=dict(type="list", elements="dict", options=aggregate_spec) +        aggregate=dict(type="list", elements="dict", options=aggregate_spec),      )      argument_spec.update(element_spec) | 
