コード例 #1
0
def main():
    """
    Main entry point for module execution

    :returns: the result form module invocation
    """
    required_if = [('state', 'merged', ('config',)),
                   ('state', 'replaced', ('config',)),
                   ('state', 'overridden', ('config',))]

    module = AnsibleModule(argument_spec=VlansArgs.argument_spec,
                           required_if=required_if,
                           supports_check_mode=True)

    result = Vlans(module).execute_module()
    module.exit_json(**result)
コード例 #2
0
def main():
    """
    Main entry point for module execution

    :returns: the result form module invocation
    """
    required_if = [
        ("state", "merged", ("config",)),
        ("state", "replaced", ("config",)),
        ("state", "overridden", ("config",)),
    ]

    module = AnsibleModule(
        argument_spec=VlansArgs.argument_spec,
        required_if=required_if,
        supports_check_mode=True,
    )

    result = Vlans(module).execute_module()
    module.exit_json(**result)