示例#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=InterfacesArgs.argument_spec,
                           required_if=required_if,
                           supports_check_mode=True)

    result = Interfaces(module).execute_module()
    module.exit_json(**result)
def main():
    """
    Main entry point for module execution

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

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

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