Merge remote-tracking branch 'upstream/0.30'
This commit is contained in:
commit
39dc93c73c
1 file changed
+8
-1
@@ -50,6 +50,10 @@ options:
|
|||||||
password:
|
password:
|
||||||
description: Password
|
description: Password
|
||||||
required: true
|
required: true
|
||||||
|
timeout:
|
||||||
|
description: Timeout for connections and requests to device
|
||||||
|
required: false
|
||||||
|
default: 60
|
||||||
config_file:
|
config_file:
|
||||||
description: Where to load the configuration from.
|
description: Where to load the configuration from.
|
||||||
required: true
|
required: true
|
||||||
@@ -90,6 +94,7 @@ EXAMPLES = '''
|
|||||||
commit_changes={{ commit_changes }}
|
commit_changes={{ commit_changes }}
|
||||||
replace_config={{ replace_config }}
|
replace_config={{ replace_config }}
|
||||||
diff_file=../compiled/{{ inventory_hostname }}/diff
|
diff_file=../compiled/{{ inventory_hostname }}/diff
|
||||||
|
timeout={{timeout}}
|
||||||
|
|
||||||
From the CLI we would trigger the playbook like:
|
From the CLI we would trigger the playbook like:
|
||||||
|
|
||||||
@@ -114,6 +119,7 @@ def main():
|
|||||||
hostname=dict(required=True),
|
hostname=dict(required=True),
|
||||||
username=dict(required=True),
|
username=dict(required=True),
|
||||||
password=dict(required=True),
|
password=dict(required=True),
|
||||||
|
timeout=dict(required=False, default=60, type='int'),
|
||||||
config_file=dict(required=True),
|
config_file=dict(required=True),
|
||||||
dev_os=dict(required=True),
|
dev_os=dict(required=True),
|
||||||
commit_changes=dict(required=True),
|
commit_changes=dict(required=True),
|
||||||
@@ -128,6 +134,7 @@ def main():
|
|||||||
username = module.params['username']
|
username = module.params['username']
|
||||||
dev_os = module.params['dev_os']
|
dev_os = module.params['dev_os']
|
||||||
password = module.params['password']
|
password = module.params['password']
|
||||||
|
timeout = module.params['timeout']
|
||||||
|
|
||||||
config_file = module.params['config_file']
|
config_file = module.params['config_file']
|
||||||
commit_changes = module.params['commit_changes']
|
commit_changes = module.params['commit_changes']
|
||||||
@@ -142,7 +149,7 @@ def main():
|
|||||||
|
|
||||||
network_driver = get_network_driver(dev_os)
|
network_driver = get_network_driver(dev_os)
|
||||||
|
|
||||||
device = network_driver(hostname, username, password)
|
device = network_driver(hostname, username, password, timeout)
|
||||||
device.open()
|
device.open()
|
||||||
|
|
||||||
if replace_config:
|
if replace_config:
|
||||||
|
|||||||
Reference in new issue
Block a user