Forum Discussion
brett_01_135751
Nimbostratus
Mar 04, 2018f5 and ansible
I am fairly new to ansible and only reasonably proficient with f5s (day job is mainly DNS) so please forgive me if this question looks a little basic.
I'm trying to manipulate route domains with...
Andy_McGrath
Cumulonimbus
Mar 06, 2019First looks like you have an issue gathering facts, worth setting this to
False.
Then I would setup and use a variable as the
provider make it much easier to read your tasks without the same repeated elements all the time.
I have not testing the following
ansible playbook file but I think it should do want you need.
---
- name: Add Route Domain ID 1234
hosts: bigip
connection: local
gather_facts: False
vars:
f5Provider:
server: "{{inventory_hostname}}"
server_port: 443
user: "brettcarr"
password: "my password"
validate_certs: no
transport: rest
tasks:
- name: Create a route domain
bigip_routedomain:
provider: "{{f5Provider}}"
id: "1234"
state: "present"
delegate_to: localhost
Make sure you have ansible version 2.2 or above and the python F5 SDK (
f5-sdk) installed.Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
