diff options
Diffstat (limited to 'plugins/modules/vyos_ospf_interfaces.py')
-rw-r--r-- | plugins/modules/vyos_ospf_interfaces.py | 78 |
1 files changed, 57 insertions, 21 deletions
diff --git a/plugins/modules/vyos_ospf_interfaces.py b/plugins/modules/vyos_ospf_interfaces.py index 33290581..f86acb7a 100644 --- a/plugins/modules/vyos_ospf_interfaces.py +++ b/plugins/modules/vyos_ospf_interfaces.py @@ -1,27 +1,9 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# Copyright 2020 Red Hat +# Copyright 2024 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -############################################# -# WARNING # -############################################# -# -# This file is auto generated by the resource -# module builder playbook. -# -# Do not edit this file manually. -# -# Changes to this file will be over written -# by the resource module builder. -# -# Changes should be made in the model used to -# generate this file or in the resource module -# builder template. -# -############################################# - """ The module file for vyos_ospf_interfaces """ @@ -153,6 +135,7 @@ options: - rendered default: merged """ + EXAMPLES = """ # Using merged # @@ -881,6 +864,53 @@ EXAMPLES = """ # ], """ +RETURN = """ +before: + description: The configuration prior to the module execution. + returned: when I(state) is C(merged), C(replaced), C(overridden), C(deleted) or C(purged) + type: dict + sample: > + This output will always be in the same format as the + module argspec. +after: + description: The resulting configuration after module execution. + returned: when changed + type: dict + sample: > + This output will always be in the same format as the + module argspec. +commands: + description: The set of commands pushed to the remote device. + returned: when I(state) is C(merged), C(replaced), C(overridden), C(deleted) or C(purged) + type: list + sample: + - "set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345'" + - "set interfaces bonding bond2 ip ospf bandwidth '70'" + - "set interfaces bonding bond2 ip ospf transmit-delay '45'" +rendered: + description: The provided configuration in the task rendered in device-native format (offline). + returned: when I(state) is C(rendered) + type: list + sample: + - "set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key '1111111111232345'" + - "set interfaces bonding bond2 ip ospf bandwidth '70'" + - "set interfaces bonding bond2 ip ospf transmit-delay '45'" +gathered: + description: Facts about the network resource gathered from the remote device as structured data. + returned: when I(state) is C(gathered) + type: list + sample: > + This output will always be in the same format as the + module argspec. +parsed: + description: The device native config provided in I(running_config) option parsed into structured data as per module argspec. + returned: when I(state) is C(parsed) + type: list + sample: > + This output will always be in the same format as the + module argspec. +""" + from ansible.module_utils.basic import AnsibleModule from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.argspec.ospf_interfaces.ospf_interfaces import ( @@ -899,8 +929,14 @@ def main(): """ module = AnsibleModule( argument_spec=Ospf_interfacesArgs.argument_spec, - mutually_exclusive=[], - required_if=[], + mutually_exclusive=[["config", "running_config"]], + required_if=[ + ["state", "merged", ["config"]], + ["state", "replaced", ["config"]], + ["state", "overridden", ["config"]], + ["state", "rendered", ["config"]], + ["state", "parsed", ["running_config"]], + ], supports_check_mode=True, ) |