Forum Discussion
Create HTTPS Pool Monitor on LTM using Ansible
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.
- jbilbro_41390Aug 12, 2016Nimbostratus
Yes, please post your example Ansible and Python code!
- ARsenthil_30459Feb 02, 2017Nimbostratus
@Royce, Even i am also trying to do a similar stuff , it would be great if you can share the example Thanks
- Nazir_52641May 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
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com