Forum Discussion
Royce_110733
Nimbostratus
In the end, I decided to use Ansible to build a python script that makes cURL posts to the iControl REST API in order to build objects on the LTM. I used the requests and json libraries in python and the total work was only a few hours. I decided to go down this path so the python script could go through a review workflow before it was executed.
If anyone is interested I can provide some examples of the Ansible and Python configs.
Nazir_52641
May 24, 2017Cirrus
Hi Senthil,jbilbro,
You can use iControl REST API using uri module to create any object in F5. Below sample code is used to create node in F5.
- name: " Create node"
uri:
url: "https://bigip1.example.com/mgmt/tm/ltm/node/"
method: "POST"
validate_certs: no
username: "admin"
password: "admin"
body_format: "json"
body:
name: "192.168.5.100"
partition: "Common"
address: "192.168.5.100"
delegate_to: localhost
Thanks
Syed Nazir