�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l Z d d l Z d d l
m Z yD d d
l m Z d d l m Z d d l m Z d d l m Z WnQ e k
rd d
l m Z d d l m Z d d l m Z d d l m Z n Xd � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d � Z e d k r�e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont stableinterfacet statust certifiedt supported_byse
---
module: bigip_wait
short_description: Wait for a BIG-IP condition before continuing
description:
- You can wait for BIG-IP to be "ready". By "ready", we mean that BIG-IP is ready
to accept configuration.
- This module can take into account situations where the device is in the middle
of rebooting due to a configuration change.
version_added: 2.5
options:
timeout:
description:
- Maximum number of seconds to wait for.
- When used without other conditions it is equivalent of just sleeping.
- The default timeout is deliberately set to 2 hours because no individual
REST API.
type: int
default: 7200
delay:
description:
- Number of seconds to wait before starting to poll.
type: int
default: 0
sleep:
description:
- Number of seconds to sleep between checks, before 2.3 this was hardcoded to 1 second.
type: int
default: 1
msg:
description:
- This overrides the normal error message from a failure to meet the required conditions.
type: str
extends_documentation_fragment: f5
author:
- Tim Rupp (@caphrim007)
sl
- name: Wait for BIG-IP to be ready to take configuration
bigip_wait:
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Wait a maximum of 300 seconds for BIG-IP to be ready to take configuration
bigip_wait:
timeout: 300
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Wait for BIG-IP to be ready, don't start checking for 10 seconds
bigip_wait:
delay: 10
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
s
# only common fields returned
N( t
AnsibleModule( t F5RestClient( t
F5ModuleError( t AnsibleF5Parameters( t f5_argument_specc C` s9 t j j � | } | j d | j p( d d | j � d S( Nt msgs Timeout when waiting for BIG-IPt elapsed( t datetimet utcnowt fail_jsonR
t seconds( t modulet wantt startR ( ( sI /usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_wait.pyt hard_timeoutg s t
Parametersc B` sG e Z d g Z d � Z e d � � Z e d � � Z e d � � Z RS( R c C` sX i } y: x$ | j D] } t | | � | | <q W| j | � } Wn t k
rS n X| S( N( t returnablest getattrt _filter_paramst Exception( t selft resultt
returnable( ( sI /usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_wait.pyt to_returns s
c C` s( | j d d k r d St | j d � S( Nt delay( t _valuest Nonet int( R ( ( sI /usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_wait.pyR } s c C` s( | j d d k r d St | j d � S( Nt timeout( R! R"