Forum Discussion

Marco_Soldat_26's avatar
Marco_Soldat_26
Icon for Nimbostratus rankNimbostratus
May 12, 2017

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?

6 Replies

  •  

    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