# Can some one share the playbook for F5 BIGIP traffic enable/disable

**URL:** <https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560>\
**Category:** Ansible Project\
**Created:** [May 24, 2017, 5:26am UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560 "2017-05-24T05:26:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 24, 2017, 5:26am UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/1 "2017-05-24T05:26:03Z")

</div>

Hi There,

Can you please share the used case Playbook for the LTM/GTM traffic disable in F5 Big IP.  
I have the requirement to switch the Traffic during the change window to do the Server side deployments.

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 25, 2017, 10:22pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/2 "2017-05-25T22:22:56Z")

</div>

I have tried the below to disable the LTM pool member using the play book as below, But getting the error.

Playbook:-

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 25, 2017, 10:37pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/3 "2017-05-25T22:37:07Z")

</div>

Siva,

The example you linked to is for the node documentation of an unreleased F5 module. For future reference for anything that you find or get from “[f5-ansible.readthedocs.io](http://f5-ansible.readthedocs.io)”, I would advise that you open a Github issue at F5’s repository here

[https://github.com/F5Networks/f5-ansible](https://github.com/F5Networks/f5-ansible)

Now, to address your question, the documentation for pool members that is in Ansible itself can be found at Ansible’s documentation site here

[http://docs.ansible.com/ansible/bigip\_pool\_member\_module.html](http://docs.ansible.com/ansible/bigip_pool_member_module.html)

Which mentions disabled-ness under the monitor\_state and session\_state arguments.

Hope that helps,

-tim

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 25, 2017, 11:06pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/4 "2017-05-25T23:06:04Z")

</div>

Here’s an example Siva of doing what you asked about.

[https://github.com/F5Networks/f5-ansible/blob/devel/examples/pool-member-enable-disable.yaml](https://github.com/F5Networks/f5-ansible/blob/devel/examples/pool-member-enable-disable.yaml)

hope that helps,

-tim

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 26, 2017, 6:55pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/5 "2017-05-26T18:55:59Z")

</div>

Hi Tim,

Thank you so much for the Help. I am able to disable/enable the pool member in LTM. Much appreciated help…!!

Below are the details i used.

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 27, 2017, 9:12pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/6 "2017-05-27T21:12:25Z")

</div>

Hi Tim,

I am trying to enable/disable the GTM pool members using the module “bigip\_gtm\_pool”

But this is not working, Could you advice if any other module i can use to disable/enable the GTM pool members.

**Play book which i used as below:-**

- hosts: testgtm  
connection: local

tasks:

- name: Force GTM member offline

bigip\_gtm\_pool:  
server: “10.44.193.38”  
user: “testuser”  
password: “testuser123”  
state: “disabled”  
name: “pool\_uatpayback.vcr.com”  
host: “41.208.60.19”  
port: “443”  
delegate\_to: localhost

Thanks  
Siva Subramaniyan

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 27, 2017, 9:27pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/7 "2017-05-27T21:27:13Z")

</div>

what’s not working about it?

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 28, 2017, 5:25am UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/8 "2017-05-28T05:25:36Z")

</div>

HI Tim,

When I run the Above play book, getting the error as below. Looks like my Ansible version is not recognizing the “bigip\_gtm\_pool” module. Please advise.

**Ansible Version:-**

ansible 2.3.0.0  
config file = /etc/ansible/ansible.cfg  
configured module search path = Default w/o overrides  
python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

**Error while running :-**

**$ ansible-playbook f5-GTM-pool-disable.yml -i …/inv/fact-host --syntax-check -vvvv**

Using /etc/ansible/ansible.cfg as config file  
**ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.**

The error appears to have been in ‘/apps/ansible-scripts/f5-BigIP/playbooks/f5-GTM-pool-disable.yml’: line 7, column 5, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Force pool member offline  
^ here

The error appears to have been in ‘/apps/ansible-scripts/f5-BigIP/playbooks/f5-GTM-pool-disable.yml’: line 7, column 5, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Force pool member offline  
^ here

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 29, 2017, 7:18pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/9 "2017-05-29T19:18:46Z")

</div>

Hey Siva,

That module is not yet part of Ansible core. You need to install it locally from the f5-ansible repository until it is.

Instructions for doing that can be found here

[https://f5-ansible.readthedocs.io/en/latest/usage/installing\_modules.html](https://f5-ansible.readthedocs.io/en/latest/usage/installing_modules.html)

-tim

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 31, 2017, 7:48pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/10 "2017-05-31T19:48:58Z")

</div>

HI Tim,

Thanks for the details.

I have tried copying the [https://github.com/F5Networks/f5-ansible/blob/master/library/bigip\_gtm\_pool.py](https://github.com/F5Networks/f5-ansible/blob/master/library/bigip_gtm_pool.py) module

placed in “/usr/lib/python2.7/site-packages/ansible/modules/network/f5”

and tried my execution… Some how it fails, can i wait till get the stable version or can you advice the stable module to place and try. i have the requirement to control the GTM traffic from ansible as my project delivery. any help is much appreciated,

$ ansible-playbook f5-GTM-pool-disable.yml -i …/inv/fact-host -vvvv  
Using /etc/ansible/ansible.cfg as config file  
Loading callback plugin skippy of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/ **init**.pyc

PLAYBOOK: f5-GTM-pool-disable.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in f5-GTM-pool-disable.yml

PLAY [testgtm] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py  
\<10.44.193.38\> ESTABLISH LOCAL CONNECTION FOR USER: ansuser  
\<10.44.193.38\> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1496259129.14-190984755053273`” && echo ansible-tmp-1496259129.14-190984755053273=“`echo $HOME/.ansible/tmp/ansible-tmp-1496259129.14-190984755053273`” ) && sleep 0’  
\<10.44.193.38\> PUT /tmp/tmpg3h\_hL TO /home/ansuser/.ansible/tmp/ansible-tmp-1496259129.14-190984755053273/setup.py  
\<10.44.193.38\> EXEC /bin/sh -c ‘chmod u+x /home/ansuser/.ansible/tmp/ansible-tmp-1496259129.14-190984755053273/ /home/ansuser/.ansible/tmp/ansible-tmp-1496259129.14-190984755053273/setup.py && sleep 0’  
\<10.44.193.38\> EXEC /bin/sh -c ‘/usr/bin/python /home/ansuser/.ansible/tmp/ansible-tmp-1496259129.14-190984755053273/setup.py; rm -rf “/home/ansuser/.ansible/tmp/ansible-tmp-1496259129.14-190984755053273/” \> /dev/null 2\>&1 && sleep 0’  
ok: [10.44.193.38]  
META: ran handlers

TASK [Force pool member offline] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /opt/ansible-scripts/f5-BigIP/playbooks/f5-GTM-pool-disable.yml:7  
fatal: [10.44.193.38]: FAILED! =\> {  
“failed”: true,  
“msg”: “Could not find imported module support code for bigip\_gtm\_pool. Looked for either \*.py or f5.py”  
}

msg: Could not find imported module support code for bigip\_gtm\_pool. Looked for either \*.py or f5.py  
to retry, use: --limit @/opt/ansible-scripts/f5-BigIP/playbooks/f5-GTM-pool-disable.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
10.44.193.38 : ok=1 changed=0 unreachable=0 failed=1

Thanks  
Siva Subramaniyan

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 31, 2017, 8:24pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/11 "2017-05-31T20:24:14Z")

</div>

the module you’re using is from “master” branch.

Master is not the newest code. the one you want is in “devel” here is the link.

[https://github.com/F5Networks/f5-ansible/blob/devel/library/bigip\_gtm\_pool.py](https://github.com/F5Networks/f5-ansible/blob/devel/library/bigip_gtm_pool.py)

-tim

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 31, 2017, 10:04pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/12 "2017-05-31T22:04:10Z")

</div>

Hi Tim,

Thanks for the details…! i got the below error while running the devel branch module. I am sorry to disturb you again.

$ ansible-playbook f5-GTM-pool-disable.yml -i …/inv/fact-host -vvvv  
Using /etc/ansible/ansible.cfg as config file  
Loading callback plugin skippy of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/ **init**.pyc

PLAYBOOK: f5-GTM-pool-disable.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in f5-GTM-pool-disable.yml

PLAY [testgtm] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py  
\<10.44.193.38\> ESTABLISH LOCAL CONNECTION FOR USER: ansuser  
\<10.44.193.38\> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1496267129.89-253660434471106`” && echo ansible-tmp-1496267129.89-253660434471106=“`echo $HOME/.ansible/tmp/ansible-tmp-1496267129.89-253660434471106`” ) && sleep 0’  
\<10.44.193.38\> PUT /tmp/tmpOB79TI TO /home/ansuser/.ansible/tmp/ansible-tmp-1496267129.89-253660434471106/setup.py  
\<10.44.193.38\> EXEC /bin/sh -c ‘chmod u+x /home/ansuser/.ansible/tmp/ansible-tmp-1496267129.89-253660434471106/ /home/ansuser/.ansible/tmp/ansible-tmp-1496267129.89-253660434471106/setup.py && sleep 0’  
\<10.44.193.38\> EXEC /bin/sh -c ‘/usr/bin/python /home/ansuser/.ansible/tmp/ansible-tmp-1496267129.89-253660434471106/setup.py; rm -rf “/home/ansuser/.ansible/tmp/ansible-tmp-1496267129.89-253660434471106/” \> /dev/null 2\>&1 && sleep 0’  
ok: [10.44.193.38]  
META: ran handlers

TASK [Force pool member offline] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /apps/ansible-scripts/f5-BigIP/playbooks/f5-GTM-pool-disable.yml:7  
Using module file /usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip\_gtm\_pool.py  
 ESTABLISH LOCAL CONNECTION FOR USER: ansuser  
 EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1496267130.41-260369370140814`” && echo ansible-tmp-1496267130.41-260369370140814=“`echo $HOME/.ansible/tmp/ansible-tmp-1496267130.41-260369370140814`” ) && sleep 0’  
 PUT /tmp/tmpEWcAQZ TO /home/ansuser/.ansible/tmp/ansible-tmp-1496267130.41-260369370140814/bigip\_gtm\_pool.py  
 EXEC /bin/sh -c ‘chmod u+x /home/ansuser/.ansible/tmp/ansible-tmp-1496267130.41-260369370140814/ /home/ansuser/.ansible/tmp/ansible-tmp-1496267130.41-260369370140814/bigip\_gtm\_pool.py && sleep 0’  
 EXEC /bin/sh -c ‘/usr/bin/python2 /home/ansuser/.ansible/tmp/ansible-tmp-1496267130.41-260369370140814/bigip\_gtm\_pool.py; rm -rf “/home/ansuser/.ansible/tmp/ansible-tmp-1496267130.41-260369370140814/” \> /dev/null 2\>&1 && sleep 0’  
The full traceback is:  
Traceback (most recent call last):  
File “/tmp/ansible\_cLPO8c/ansible\_module\_bigip\_gtm\_pool.py”, line 654, in   
main()  
File “/tmp/ansible\_cLPO8c/ansible\_module\_bigip\_gtm\_pool.py”, line 642, in main  
required\_if=spec.required\_if  
File “/tmp/ansible\_cLPO8c/ansible\_modlib.zip/ansible/module\_utils/f5\_utils.py”, line 240, in **init**  
File “/tmp/ansible\_cLPO8c/ansible\_modlib.zip/ansible/module\_utils/f5\_utils.py”, line 265, in \_get\_mgmt\_root  
File “/usr/lib/python2.7/site-packages/f5/bigip/ **init**.py”, line 124, in **init**  
self.post\_configuration\_setup()  
File “/usr/lib/python2.7/site-packages/f5/bigip/ **init**.py”, line 91, in post\_configuration\_setup  
self.\_get\_tmos\_version()  
File “/usr/lib/python2.7/site-packages/f5/bigip/ **init**.py”, line 96, in \_get\_tmos\_version  
response = connect.get(base\_uri)  
File “/usr/lib/python2.7/site-packages/icontrol/session.py”, line 258, in wrapper  
response = method(self, REST\_uri, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/icontrol/session.py”, line 427, in get  
return self.session.get(uri, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 501, in get  
return self.request(‘GET’, url, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 474, in request  
prep = self.prepare\_request(req)  
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 407, in prepare\_request  
hooks=merge\_hooks(request.hooks, self.hooks),  
File “/usr/lib/python2.7/site-packages/requests/models.py”, line 306, in prepare  
self.prepare\_auth(auth, url)  
File “/usr/lib/python2.7/site-packages/requests/models.py”, line 543, in prepare\_auth  
r = auth(self)  
File “/usr/lib/python2.7/site-packages/icontrol/authtoken.py”, line 203, in **call**  
self.get\_new\_token(netloc)  
File “/usr/lib/python2.7/site-packages/icontrol/authtoken.py”, line 100, in get\_new\_token  
self.password))  
File “/usr/lib/python2.7/site-packages/requests/api.py”, line 110, in post  
return request(‘post’, url, data=data, json=json, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/requests/api.py”, line 56, in request  
return session.request(method=method, url=url, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 488, in request  
resp = self.send(prep, \*\*send\_kwargs)  
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 609, in send  
r = adapter.send(request, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/requests/adapters.py”, line 487, in send  
raise ConnectionError(e, request=request)  
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘10.44.193.38’, port=443): Max retries exceeded with url: /mgmt/shared/authn/login (Caused by NewConnectionError(‘\<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x400a3d0\>: Failed to establish a new connection: [Errno 110] Connection timed out’,))

fatal: [10.44.193.38 → localhost]: FAILED! =\> {  
“changed”: false,  
“failed”: true,  
“module\_stderr”: “Traceback (most recent call last):\n File "/tmp/ansible\_cLPO8c/ansible\_module\_bigip\_gtm\_pool.py", line 654, in \n main()\n File "/tmp/ansible\_cLPO8c/ansible\_module\_bigip\_gtm\_pool.py", line 642, in main\n required\_if=spec.required\_if\n File "/tmp/ansible\_cLPO8c/ansible\_modlib.zip/ansible/module\_utils/f5\_utils.py", line 240, in **init** \n File "/tmp/ansible\_cLPO8c/ansible\_modlib.zip/ansible/module\_utils/f5\_utils.py", line 265, in \_get\_mgmt\_root\n File "/usr/lib/python2.7/site-packages/f5/bigip/ **init**.py", line 124, in **init** \n self.post\_configuration\_setup()\n File "/usr/lib/python2.7/site-packages/f5/bigip/ **init**.py", line 91, in post\_configuration\_setup\n self.\_get\_tmos\_version()\n File "/usr/lib/python2.7/site-packages/f5/bigip/ **init**.py", line 96, in \_get\_tmos\_version\n response = connect.get(base\_uri)\n File "/usr/lib/python2.7/site-packages/icontrol/session.py", line 258, in wrapper\n response = method(self, REST\_uri, \*\*kwargs)\n File "/usr/lib/python2.7/site-packages/icontrol/session.py", line 427, in get\n return self.session.get(uri, \*\*kwargs)\n File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 501, in get\n return self.request(‘GET’, url, \*\*kwargs)\n File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 474, in request\n prep = self.prepare\_request(req)\n File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 407, in prepare\_request\n hooks=merge\_hooks(request.hooks, self.hooks),\n File "/usr/lib/python2.7/site-packages/requests/models.py", line 306, in prepare\n self.prepare\_auth(auth, url)\n File "/usr/lib/python2.7/site-packages/requests/models.py", line 543, in prepare\_auth\n r = auth(self)\n File "/usr/lib/python2.7/site-packages/icontrol/authtoken.py", line 203, in **call** \n self.get\_new\_token(netloc)\n File "/usr/lib/python2.7/site-packages/icontrol/authtoken.py", line 100, in get\_new\_token\n self.password))\n File "/usr/lib/python2.7/site-packages/requests/api.py", line 110, in post\n return request(‘post’, url, data=data, json=json, \*\*kwargs)\n File "/usr/lib/python2.7/site-packages/requests/api.py", line 56, in request\n return session.request(method=method, url=url, \*\*kwargs)\n File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 488, in request\n resp = self.send(prep, \*\*send\_kwargs)\n File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 609, in send\n r = adapter.send(request, \*\*kwargs)\n File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 487, in send\n raise ConnectionError(e, request=request)\nrequests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘10.44.193.38’, port=443): Max retries exceeded with url: /mgmt/shared/authn/login (Caused by NewConnectionError(‘\<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x400a3d0\>: Failed to establish a new connection: [Errno 110] Connection timed out’,))\n”,  
“module\_stdout”: “”,  
“msg”: “MODULE FAILURE”,  
“rc”: 0  
}

msg: MODULE FAILURE  
to retry, use: --limit @/apps/ansible-scripts/f5-BigIP/playbooks/f5-GTM-pool-disable.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
10.44.193.38 : ok=1 changed=0 unreachable=0 failed=1

Thanks  
Siva Subramaniyan

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 31, 2017, 10:10pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/13 "2017-05-31T22:10:40Z")

</div>

that error indicates the module cannot reach your F5 device.

“”"  
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘10.44.193.38’, port=443): Max retries exceeded with url: /mgmt/shared/authn/login (Caused by NewConnectionError(‘\<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x400a3d0\>: Failed to establish a new connection: [Errno 110] Connection timed out’,))

“”"

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 31, 2017, 10:32pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/14 "2017-05-31T22:32:25Z")

</div>

Hi Tim,

Thanks for notifying it, I was trying to connect to the unreachable GTM in different Datacenter.

I have pointed to the correct GTM where i have the connectivity and ran the Playbook to disable the GTM pool. Getting the Below error. Please advice.

**Play book :-**

**$ cat f5-GTM-pool-disable.yml**

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 31, 2017, 10:35pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/15 "2017-05-31T22:35:03Z")

</div>

what version of bigip are you using? that could be a result of an outdated REST daemon, or a crashed REST daemon.

what is the output of

bigstart status restjavad

on the bigip CLI?

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 31, 2017, 10:49pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/16 "2017-05-31T22:49:13Z")

</div>

Hi Tim,

I just tried, with my “testuser” credentials.

**Last login: Fri May 26 10:35:36 2017 from 172.21.132.162**

**testuser@(RS1-PV-INTRA-NET-GTM)(cfg-sync Standalone)(Active)(/Common)(tmos)# bigstart status restjavad**

**Syntax Error: unexpected argument “bigstart”**

My “testuser” have only operator access to the GTM.It will all only to enable/disable the pool members. May i know what kind of access i should have to make REST API calls. So that i will work with Network team to enable it.

Thanks  
Siva Subramaniyan

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 31, 2017, 10:58pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/17 "2017-05-31T22:58:40Z")

</div>

generally you need administrator access on the box. what version of bigip is this?

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 31, 2017, 11:13pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/18 "2017-05-31T23:13:14Z")

</div>

Hi Tim,

We use the BIG IP version **"BIG-IP 11.5.3 1.0.167 "**

Since i am a DevOps engineer, i may not get admin access to GTM\*\*,\*\* But i was able to control the traffic in LTM using the same credentials by using \*\*"\*\ ***bigip\_pool\_member".**

Any idea, in the same way i can do it in GTM as well.

Thanks  
Siva Subramaniyan

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [May 31, 2017, 11:24pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/19 "2017-05-31T23:24:48Z")

</div>

bigip\_pool\_member uses the SOAP api instead of the REST api. this may be the reason that the gtm module is returning the error that it is; not because of your credential level.

At this point I would advise to begin considering an upgrade path for the devices as the Ansible modules that are currently under development as well as the existing ones that are being refactored will require version 12 or greater.

---

<div class="post-metadata">

**Author:** ![Siva\_Subramaniyan](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Siva\_Subramaniyan](https://forum.ansible.com/u/Siva_Subramaniyan)\
**Post date:** [May 31, 2017, 11:38pm UTC](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560/20 "2017-05-31T23:38:19Z")

</div>

Oh Ok, Thanks for the Details Tim…!

Is it possible to connect my GTM over SSH/TMOS to disable/enable GTM traffic from Ansible by just running as remote command.

Thanks  
Siva Subramaniyan

[Next page](https://forum.ansible.com/t/can-some-one-share-the-playbook-for-f5-bigip-traffic-enable-disable/24560.md?page=2)
