Running f5 bigip_pool module

Hi,

Just wondering if someone can advise, trying to run one of the example f5 bigip_pool module playbooks.

Comes back with the below, installed bigsuds python stuff, is there anything else needed for this to run?

Details:
playbook details
local_action: >
bigip_pool
server=172.17.0.45
user=testuser
password=test
state=absent
name=POOL
partition=common
host=“{{ ansible_default_ipv4[“172.22.13.181”] }}”
port=80

Output
ERROR: Syntax Error while loading YAML script, bigip.yml
Note: The error may actually appear before this position: line 3, column 1

bigip_pool
server=172.17.0.45
^

Is that the email formatting, or do you not have any indentation there? It may be helpful to use a paste site or gist to show the formatting outside of email.

Hi,

It seems to be formatted ok when putting it in an online yaml parser but still seems to be complaining.

ERROR: parse error: playbooks must be formatted as a YAML list

local_action: >
bigip_pool
server=172.17.0.45
user=testuser
password=test
state=absent
name=POOL
partition=common
host=“{{ ansible_default_ipv4[“172.22.13.181”] }}”
port=80

​Can you put your playbook on a pastebin for review?​

Hi,

Yeah sure added it on there as requested.

http://pastebin.com/BuZLdQBJ

​Can't reproduce that error based on that. I assume you just copied a
snipped from the task?​ you have the full syntax right for a play?

Compare with http://sprunge.us/OYYO ?

Hi,

Cheers for that I have added the top bit and it does seem to run now but seems to now bring back the below message.

PLAY [localhost] **************************************************************
skipping: no hosts matched

PLAY RECAP ********************************************************************

Does this mean it needs to be defined within the hosts file in order to run the command? I since added the server I am trying to remove from the bigip pool into hosts under test group and that seems to make it attempt to run detailed below.

PLAY [test] *******************************************************************

GATHERING FACTS ***************************************************************
ok: [172.22.13.181]

TASK: [bigip_pool server=172.17.0.45 user=test.user password=test state=absent name=pool partition=common host=“172.22.13.181” port=80
] ***
failed: [172.22.13.181] => {“failed”: true}
msg: received exception: <urlopen error [Errno 110] Connection timed out>

FATAL: all hosts have already failed – aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/root/bigip2.retry

172.22.13.181 : ok=1 changed=0 unreachable=0 failed=1

​This seems rather self-explaining, the module cannot connect to the big ip
box, or at least not on ip/port you provided.

Serge​

Hi,

So just to confirm, how do you define the port for the bigip server if this is required, as the port option at the end of the eample is I assume is for the port member.

If its on ssl for icontrol do you need to put 172.17.0.45:443?

172.17.0.45 will suffice

Seems to still being saying connection timed out but not really sure why that is as it can connect to both the server its running on (the one that its trying to remove from the pool) and the icontrol/bigip server.

Does not event seem to get the part where its trying to do anything with the bigip server.

PLAY [172.18.26.28] ***********************************************************

GATHERING FACTS ***************************************************************
ok: [172.18.26.28]

TASK: [bigip_pool server=“172.17.0.135” user=test.user password=test state=absent name=pool partition=common host=“172.18.26.28” port=80
] ***
failed: [172.18.26.28] => {“failed”: true}
msg: received exception: <urlopen error [Errno 110] Connection timed out>

FATAL: all hosts have already failed – aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/export/home/testuser/bigip3.retry

172.18.26.28 : ok=1 changed=0 unreachable=0 failed=1

Greetings,

I am the author of the BIG-IP module. As Serge mentioned, this is a classic “can’t connect to server” type of error. When you say “it can connect to both the server its running on (the one that its trying to remove from the pool) and the icontrol/bigip server”, what is “it”? Do you mean the host you are trying to add (172.18.26.28) or the server you are running the ansible playbook from?

Since this is designed to be run as a local action, you need to ensure the ansible server can reach the BIG-IP (172.17.0.135) on port 443. You can test this easily with netcat:

[mhite@cowboy:~]$ nc -vz 172.17.0.135 443
Connection to 172.17.0.135 443 port [tcp/https] succeeded!
[mhite@cowboy:~]$ nc -vz 172.17.0.135 80
nc: connect to 172.17.0.135 port 80 (tcp) failed: Connection refused

Since you are receiving a “connection timed out” error, I suspect you aren’t even getting a SYN-ACK response to your TCP SYN. Usually in cases like this, you probably are being blocked by a firewall.

Hope this helps,

-M