Creating BIG-IP ephemeral nodes using Ansible

Hello F5 team.

We are using Ansible to deploy an F5 BIG-IP cluster in AWS, including the configuration. I am trying to create an FQDN ephemeral node using the bigip_node module. The node is an ALB, the IP addresses tends to change daily, which is why it needs to be ephemeral. Here is the code I am using as a test:

- bigip_node:
server: "big-ip-1.example.com"
user: "admin"
password: "password"
validate_certs: no
state: "present"
partition: "Common"
host: "app1-alb.example.com"
name: "app1"
monitor_state: enabled
session_state: enabled
"msg": "received exception: Server raised fault: 'Exception caught in LocalLB::urn:iControl:LocalLB/NodeAddressV2::create()\nCommon::InvalidArgument\n'

Does the bigip_node module support ephemeral nodes or will I need to use a different approach?

Hi Marco,

   Until bigip_node module is updated to support ephemeral node you can use uri module
   with iControl REST API. Below is the sample


- name: " Create ephemeral node"
  uri:
    url: "https://big-ip-1.example.com/mgmt/tm/ltm/node/"
    method: "POST"
    validate_certs: no
    username: "admin"
    password: "admin"
    body_format: "json"
    body:
      name: "app1-alb.example.com"
      partition: "Common"
      address: "app1-alb.example.com"
 delegate_to: localhost 

Note: If we now the iControl REST API to create an object we can use the same to create 
the object using uri module without any dependency on any bigip related modules.

Thanks
Syed Nazir

@Marco Soldat the bigip_node module should now support your feature request. You can get it here.

https://github.com/F5Networks/f5-ansible/blob/devel/library/bigip_node.py

It will ship with Ansible 2.5

@Tim is there a way to add an fqdn node to a pool using bigip_pool_member I looked in the devel branch and don’t see this yet?

@Steve I dont think we’ve added similar functionality to bigip_pool_member yet.

What are the recommended / required software versions to get F5 ansible working?

@KernelPanic, v12 and above.