Fixes for examples in f5 modules (#49490)

So that they use provider instead of deprecated args method
pull/49492/head
Tim Rupp 6 years ago committed by GitHub
parent 40a5f7bfdf
commit 7c15417f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -247,7 +247,7 @@ author:
'''
EXAMPLES = r'''
- name: Create a ...
- name: Create a syslog config
bigip_device_syslog:
name: foo
provider:

@ -68,10 +68,11 @@ EXAMPLES = r'''
ports:
- 80
- 443
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Override the above list of ports with a new list
@ -81,10 +82,11 @@ EXAMPLES = r'''
- 3389
- 8080
- 25
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Create port list with series of ranges
@ -94,10 +96,11 @@ EXAMPLES = r'''
- 25-30
- 80-500
- 50-78
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Use multiple types of port arguments
@ -110,29 +113,32 @@ EXAMPLES = r'''
ports:
- 8080
- 443
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Remove port list
bigip_firewall_port_list:
name: foo
password: secret
server: lb.mydomain.com
state: absent
user: admin
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Create port list from a file with one port per line
bigip_firewall_port_list:
name: lot-of-ports
ports: "{{ lookup('file', 'my-large-port-list.txt').split('\n') }}"
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
'''

@ -64,11 +64,12 @@ author:
EXAMPLES = r'''
- name: Create data center "New York"
bigip_gtm_datacenter:
server: lb.mydomain.com
user: admin
password: secret
name: New York
location: 222 West 23rd
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -50,10 +50,11 @@ EXAMPLES = r'''
synchronization: yes
synchronization_group_name: my-group
synchronize_zone_files: yes
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -122,28 +122,31 @@ EXAMPLES = r'''
bigip_gtm_monitor_bigip:
state: present
ip: 10.10.10.10
server: lb.mydomain.com
user: admin
password: secret
name: my_monitor
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove BIG-IP Monitor
bigip_gtm_monitor_bigip:
state: absent
server: lb.mydomain.com
user: admin
password: secret
name: my_monitor
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add BIG-IP monitor for all addresses, port 514
bigip_gtm_monitor_bigip:
server: lb.mydomain.com
user: admin
port: 514
password: secret
name: my_monitor
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -91,10 +91,11 @@ EXAMPLES = r'''
- name: Create an external monitor
bigip_gtm_monitor_external:
name: foo
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Create an external monitor with variables
@ -104,10 +105,11 @@ EXAMPLES = r'''
variables:
var1: foo
var2: bar
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add a variable to an existing set
@ -118,10 +120,11 @@ EXAMPLES = r'''
var1: foo
var2: bar
cat: dog
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -140,28 +140,31 @@ EXAMPLES = r'''
name: my_monitor
ip: 1.1.1.1
port: 80
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove FirePass Monitor
bigip_gtm_monitor_firepass:
name: my_monitor
state: absent
server: lb.mydomain.com
user: admin
password: secret
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add FirePass monitor for all addresses, port 514
bigip_gtm_monitor_firepass:
name: my_monitor
server: lb.mydomain.com
user: admin
port: 514
password: secret
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -144,28 +144,31 @@ EXAMPLES = r'''
port: 80
send: my send string
receive: my receive string
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove HTTP Monitor
bigip_gtm_monitor_http:
name: my_monitor
state: absent
server: lb.mydomain.com
user: admin
password: secret
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add HTTP monitor for all addresses, port 514
bigip_gtm_monitor_http:
name: my_monitor
server: lb.mydomain.com
user: admin
port: 514
password: secret
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -163,28 +163,31 @@ EXAMPLES = r'''
port: 80
send: my send string
receive: my receive string
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove HTTPS Monitor
bigip_gtm_monitor_https:
name: my_monitor
state: absent
server: lb.mydomain.com
user: admin
password: secret
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add HTTPS monitor for all addresses, port 514
bigip_gtm_monitor_https:
name: my_monitor
server: lb.mydomain.com
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
port: 514
password: secret
delegate_to: localhost
'''

@ -128,28 +128,31 @@ EXAMPLES = r'''
port: 80
send: my send string
receive: my receive string
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove TCP Monitor
bigip_gtm_monitor_tcp:
name: my_monitor
state: absent
server: lb.mydomain.com
user: admin
password: secret
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add TCP monitor for all addresses, port 514
bigip_gtm_monitor_tcp:
name: my_monitor
server: lb.mydomain.com
user: admin
port: 514
password: secret
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -122,28 +122,31 @@ EXAMPLES = r'''
bigip_gtm_monitor_tcp_half_open:
state: present
ip: 10.10.10.10
server: lb.mydomain.com
user: admin
password: secret
name: my_monitor
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove TCP half-open Monitor
bigip_gtm_monitor_tcp_half_open:
state: absent
server: lb.mydomain.com
user: admin
password: secret
name: my_monitor
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add half-open monitor for all addresses, port 514
bigip_gtm_monitor_tcp_half_open:
server: lb.mydomain.com
user: admin
port: 514
password: secret
name: my_monitor
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -195,19 +195,21 @@ author:
EXAMPLES = r'''
- name: Create a GTM pool
bigip_gtm_pool:
server: lb.mydomain.com
user: admin
password: secret
name: my_pool
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Disable pool
bigip_gtm_pool:
server: lb.mydomain.com
user: admin
password: secret
state: disabled
name: my_pool
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -275,20 +275,32 @@ author:
EXAMPLES = r'''
- name: Create server "GTM_Server"
bigip_gtm_server:
server: lb.mydomain.com
user: admin
password: secret
name: GTM_Server
datacenter: /Common/New York
server_type: bigip
link_discovery: disabled
virtual_server_discovery: disabled
devices:
- {'name': 'server_1', 'address': '1.1.1.1'}
- {'name': 'server_2', 'address': '2.2.2.1', 'translation':'192.168.2.1'}
- {'name': 'server_2', 'address': '2.2.2.2'}
- {'name': 'server_3', 'addresses': [{'address':'3.3.3.1'},{'address':'3.3.3.2'}]}
- {'name': 'server_4', 'addresses': [{'address':'4.4.4.1','translation':'192.168.14.1'}, {'address':'4.4.4.2'}]}
- name: server_1
address: 1.1.1.1
- name: server_2
address: 2.2.2.1
translation: 192.168.2.1
- name: server_2
address: 2.2.2.2
- name: server_3
addresses:
- address: 3.3.3.1
- address: 3.3.3.2
- name: server_4
addresses:
- address: 4.4.4.1
translation: 192.168.14.1
- address: 4.4.4.2
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Create server "GTM_Server" with expanded keys
@ -318,6 +330,10 @@ EXAMPLES = r'''
- address: 4.4.4.1
translation: 192.168.14.1
- address: 4.4.4.2
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -176,12 +176,13 @@ author:
EXAMPLES = r'''
- name: Enable virtual server
bigip_gtm_virtual_server:
server: lb.mydomain.com
user: admin
password: secret
server_name: server1
name: my-virtual-server
state: enabled
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -121,56 +121,61 @@ author:
EXAMPLES = r'''
- name: Set lb method
bigip_gtm_wide_ip:
server: lb.mydomain.com
user: admin
password: secret
pool_lb_method: round-robin
name: my-wide-ip.example.com
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add iRules to the Wide IP
bigip_gtm_wide_ip:
server: lb.mydomain.com
user: admin
password: secret
pool_lb_method: round-robin
name: my-wide-ip.example.com
irules:
- irule1
- irule2
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove one iRule from the Virtual Server
bigip_gtm_wide_ip:
server: lb.mydomain.com
user: admin
password: secret
pool_lb_method: round-robin
name: my-wide-ip.example.com
irules:
- irule1
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove all iRules from the Virtual Server
bigip_gtm_wide_ip:
server: lb.mydomain.com
user: admin
password: secret
pool_lb_method: round-robin
name: my-wide-ip.example.com
irules: ""
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Assign a pool with ratio to the Wide IP
bigip_gtm_wide_ip:
server: lb.mydomain.com
user: admin
password: secret
pool_lb_method: round-robin
name: my-wide-ip.example.com
pools:
- name: pool1
ratio: 100
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -35,9 +35,10 @@ EXAMPLES = r'''
- name: Set the hostname of the BIG-IP
bigip_hostname:
hostname: bigip.localhost.localdomain
password: secret
server: lb.mydomain.com
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -119,32 +119,29 @@ EXAMPLES = r'''
name: foo-service
template: f5.http
parameters: "{{ lookup('file', 'f5.http.parameters.json') }}"
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Upgrade foo-service to v1.2.0rc4 of the f5.http template
bigip_iapp_service:
name: foo-service
template: f5.http.v1.2.0rc4
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Configure a service using parameters in YAML
bigip_iapp_service:
name: tests
template: web_frontends
password: admin
server: "{{ inventory_hostname }}"
server_port: "{{ bigip_port }}"
validate_certs: "{{ validate_certs }}"
state: present
user: admin
parameters:
variables:
- name: var__vs_address
@ -153,19 +150,18 @@ EXAMPLES = r'''
value: 2.2.2.1:80
- name: pm__apache_servers_for_https
value: 2.2.2.2:80
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Re-configure a service whose underlying iApp was updated in place
bigip_iapp_service:
name: tests
template: web_frontends
password: admin
force: yes
server: "{{ inventory_hostname }}"
server_port: "{{ bigip_port }}"
validate_certs: "{{ validate_certs }}"
state: present
user: admin
parameters:
variables:
- name: var__vs_address
@ -174,12 +170,20 @@ EXAMPLES = r'''
value: 2.2.2.1:80
- name: pm__apache_servers_for_https
value: 2.2.2.2:80
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Try to remove the iApp template before the associated Service is removed
bigip_iapp_template:
name: web_frontends
state: absent
provider:
user: admin
password: secret
server: lb.mydomain.com
register: result
failed_when:
- result is not success
@ -189,12 +193,11 @@ EXAMPLES = r'''
bigip_iapp_service:
name: tests
template: web_frontends
password: admin
server: "{{ inventory_hostname }}"
server_port: "{{ bigip_port }}"
validate_certs: "{{ validate_certs }}"
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
parameters:
variables:
- name: var__vs_address
@ -241,10 +244,11 @@ EXAMPLES = r'''
name: data 1
- persist: yes
name: data 2
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -73,29 +73,32 @@ EXAMPLES = r'''
- name: Add the iApp contained in template iapp.tmpl
bigip_iapp_template:
content: "{{ lookup('template', 'iapp.tmpl') }}"
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Update a template in place
bigip_iapp_template:
content: "{{ lookup('template', 'iapp-new.tmpl') }}"
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Update a template in place that has existing services created from it.
bigip_iapp_template:
content: "{{ lookup('template', 'iapp-new.tmpl') }}"
force: yes
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -166,11 +166,21 @@ EXAMPLES = r'''
bigip_imish_config:
lines: bfd slow-timer 2000
save_when: modified
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: diff the running-config against a provided config
bigip_imish_config:
diff_against: intended
intended_config: "{{ lookup('file', 'master.cfg') }}"
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add config to a parent block
bigip_imish_config:
@ -183,6 +193,11 @@ EXAMPLES = r'''
- neighbor 10.10.10.11 fall-over bfd
parents: router bgp 64664
match: exact
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove an existing acl before writing it
bigip_imish_config:
@ -191,6 +206,11 @@ EXAMPLES = r'''
- access-list 10 permit 20.20.20.21
- access-list 10 deny any
before: no access-list 10
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: for idempotency, use full-form commands
bigip_imish_config:
@ -199,6 +219,11 @@ EXAMPLES = r'''
- description My Interface
# parents: int ANYCAST-P2P-2
parents: interface ANYCAST-P2P-2
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''
RETURN = r'''

@ -55,10 +55,11 @@ EXAMPLES = r'''
destinations:
- hsl1
- security-log-servers-logging
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -223,10 +223,11 @@ EXAMPLES = r'''
query_type: aaaa
up_interval: 5
adaptive: no
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -97,10 +97,11 @@ EXAMPLES = r'''
- name: Create an external monitor
bigip_monitor_external:
name: foo
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Create an external monitor with variables
@ -110,10 +111,11 @@ EXAMPLES = r'''
variables:
var1: foo
var2: bar
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Add a variable to an existing set
@ -124,10 +126,11 @@ EXAMPLES = r'''
var1: foo
var2: bar
cat: dog
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -123,30 +123,33 @@ EXAMPLES = r'''
bigip_monitor_http:
state: present
ip: 10.10.10.10
server: lb.mydomain.com
user: admin
password: secret
name: my_http_monitor
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Remove HTTP Monitor
bigip_monitor_http:
state: absent
server: lb.mydomain.com
user: admin
password: secret
name: my_http_monitor
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Include a username and password in the HTTP monitor
bigip_monitor_http:
state: absent
server: lb.mydomain.com
user: admin
password: secret
name: my_http_monitor
target_username: monitor_user
target_password: monitor_pass
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -101,21 +101,23 @@ EXAMPLES = r'''
- name: Create TCP Monitor
bigip_monitor_tcp:
state: present
server: lb.mydomain.com
user: admin
password: secret
name: my_tcp_monitor
send: tcp string to send
receive: tcp string to receive
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Remove TCP Monitor
bigip_monitor_tcp:
state: absent
server: lb.mydomain.com
user: admin
password: secret
name: my_tcp_monitor
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -86,20 +86,22 @@ EXAMPLES = r'''
- name: Create TCP Echo Monitor
bigip_monitor_tcp_echo:
state: present
server: lb.mydomain.com
user: admin
ip: 10.10.10.10
password: secret
name: my_tcp_monitor
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Remove TCP Echo Monitor
bigip_monitor_tcp_echo:
state: absent
server: lb.mydomain.com
user: admin
password: secret
name: my_tcp_monitor
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -96,28 +96,31 @@ EXAMPLES = r'''
bigip_monitor_tcp_half_open:
state: present
ip: 10.10.10.10
server: lb.mydomain.com
user: admin
password: secret
name: my_tcp_monitor
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Remove TCP half-open Monitor
bigip_monitor_tcp_half_open:
state: absent
server: lb.mydomain.com
user: admin
password: secret
name: my_tcp_monitor
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add half-open monitor for all addresses, port 514
bigip_monitor_tcp_half_open:
server: lb.mydomain.com
user: admin
port: 514
password: secret
name: my_tcp_monitor
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
'''

@ -106,19 +106,21 @@ EXAMPLES = r'''
bigip_monitor_udp:
state: present
ip: 10.10.10.10
server: lb.mydomain.com
user: admin
password: secret
name: my_udp_monitor
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Remove UDP Monitor
bigip_monitor_udp:
state: absent
server: lb.mydomain.com
user: admin
password: secret
name: my_udp_monitor
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -84,6 +84,10 @@ EXAMPLES = r'''
bigip_policy:
name: Policy-Foo
state: present
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add a rule to the new policy - Immediately published
@ -102,6 +106,11 @@ EXAMPLES = r'''
- forward: yes
select: yes
pool: pool-svrs
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add multiple rules to the new policy - Added in the order they are specified
bigip_policy_rule:
@ -109,6 +118,11 @@ EXAMPLES = r'''
name: "{{ item.name }}"
conditions: "{{ item.conditions }}"
actions: "{{ item.actions }}"
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
loop:
- name: rule1
actions:
@ -133,6 +147,11 @@ EXAMPLES = r'''
- rule1
- rule2
- rule3
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Create policy specify default rules - Left in a draft
bigip_policy:
@ -142,6 +161,11 @@ EXAMPLES = r'''
- rule1
- rule2
- rule3
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''
RETURN = r'''

@ -126,6 +126,10 @@ EXAMPLES = r'''
bigip_policy:
name: Policy-Foo
state: present
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add a rule to the new policy
@ -138,6 +142,10 @@ EXAMPLES = r'''
actions:
- type: forward
pool: pool-svrs
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add multiple rules to the new policy
@ -146,6 +154,10 @@ EXAMPLES = r'''
name: "{{ item.name }}"
conditions: "{{ item.conditions }}"
actions: "{{ item.actions }}"
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
loop:
- name: rule1
@ -171,6 +183,10 @@ EXAMPLES = r'''
- type: all_traffic
actions:
- type: ignore
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -156,69 +156,71 @@ author:
EXAMPLES = r'''
- name: Create pool
bigip_pool:
server: lb.mydomain.com
user: admin
password: secret
state: present
name: my-pool
partition: Common
lb_method: least-connections-member
slow_ramp_time: 120
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Modify load balancer method
bigip_pool:
server: lb.mydomain.com
user: admin
password: secret
state: present
name: my-pool
partition: Common
lb_method: round-robin
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add pool member
bigip_pool_member:
server: lb.mydomain.com
user: admin
password: secret
state: present
pool: my-pool
partition: Common
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set a single monitor (with enforcement)
bigip_pool:
server: lb.mydomain.com
user: admin
password: secret
state: present
name: my-pool
partition: Common
monitor_type: single
monitors:
- http
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set a single monitor (without enforcement)
bigip_pool:
server: lb.mydomain.com
user: admin
password: secret
state: present
name: my-pool
partition: Common
monitors:
- http
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set multiple monitors (all must succeed)
bigip_pool:
server: lb.mydomain.com
user: admin
password: secret
state: present
name: my-pool
partition: Common
@ -226,13 +228,14 @@ EXAMPLES = r'''
monitors:
- http
- tcp
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set multiple monitors (at least 1 must succeed)
bigip_pool:
server: lb.mydomain.com
user: admin
password: secret
state: present
name: my-pool
partition: Common
@ -241,41 +244,48 @@ EXAMPLES = r'''
monitors:
- http
- tcp
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Remove pool member from pool
bigip_pool_member:
server: lb.mydomain.com
user: admin
password: secret
state: absent
pool: my-pool
partition: Common
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Delete pool
bigip_pool:
server: lb.mydomain.com
user: admin
password: secret
state: absent
name: my-pool
partition: Common
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add metadata to pool
bigip_pool:
server: lb.mydomain.com
user: admin
password: secret
state: absent
name: my-pool
partition: Common
metadata:
ansible: 2.4
updated_at: 2017-12-20T17:50:46Z
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''
@ -841,7 +851,6 @@ class ModuleManager(object):
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
return response['selfLink']
def update_on_device(self):
params = self.changes.api_params()

@ -1110,7 +1110,6 @@ class ModuleManager(object):
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
return response['selfLink']
def update_on_device(self):
params = self.changes.api_params()

@ -216,55 +216,60 @@ EXAMPLES = r'''
- name: Create client SSL profile
bigip_profile_client_ssl:
state: present
server: lb.mydomain.com
user: admin
password: secret
name: my_profile
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Create client SSL profile with specific ciphers
bigip_profile_client_ssl:
state: present
server: lb.mydomain.com
user: admin
password: secret
name: my_profile
ciphers: "!SSLv3:!SSLv2:ECDHE+AES-GCM+SHA256:ECDHE-RSA-AES128-CBC-SHA"
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Create client SSL profile with specific SSL options
bigip_profile_client_ssl:
state: present
server: lb.mydomain.com
user: admin
password: secret
name: my_profile
options:
- no-sslv2
- no-sslv3
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Create client SSL profile require secure renegotiation
bigip_profile_client_ssl:
state: present
server: lb.mydomain.com
user: admin
password: secret
name: my_profile
secure_renegotation: request
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Create a client SSL profile with a cert/key/chain setting
bigip_profile_client_ssl:
state: present
server: lb.mydomain.com
user: admin
password: secret
name: my_profile
cert_key_chain:
- cert: bigip_ssl_cert1
key: bigip_ssl_key1
chain: bigip_ssl_cert1
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -163,30 +163,33 @@ EXAMPLES = r'''
- name: Create HTTP profile
bigip_profile_http:
name: my_profile
password: secret
server: lb.mydomain.com
insert_xforwarded_for: yes
redirect_rewrite: all
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove HTTP profile
bigip_profile_http:
name: my_profile
state: absent
server: lb.mydomain.com
user: admin
password: secret
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add HTTP profile for transparent proxy
bigip_profile_http:
name: my_profile
server: lb.mydomain.com
user: admin
proxy_type: transparent
password: secret
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
'''

@ -113,31 +113,34 @@ EXAMPLES = r'''
- name: Create HTTP2 profile
bigip_profile_http2:
name: my_profile
password: secret
server: lb.mydomain.com
insert_header: yes
insert_header_name: FOO
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove HTTP profile
bigip_profile_http2:
name: my_profile
state: absent
server: lb.mydomain.com
user: admin
password: secret
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add HTTP profile set activation modes
bigip_profile_http:
name: my_profile
server: lb.mydomain.com
user: admin
activation_modes:
- always
password: secret
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
'''

@ -125,10 +125,11 @@ EXAMPLES = r'''
- name: Create a OneConnect profile
bigip_profile_oneconnect:
name: foo
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -97,13 +97,14 @@ EXAMPLES = r'''
- name: Create a profile
bigip_profile_persistence_src_addr:
name: foo
password: secret
server: lb.mydomain.com
state: present
user: admin
hash_algorithm: carp
match_across_services: yes
match_across_virtuals: yes
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
'''

@ -77,10 +77,11 @@ EXAMPLES = r'''
parent: f5-tcp-progressive
time_wait_recycle: no
idle_timeout: 300
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -74,10 +74,11 @@ EXAMPLES = r'''
parent: udp
idle_timeout: 300
datagram_load_balancing: no
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -76,22 +76,22 @@ author:
EXAMPLES = r'''
- name: Provision PEM at "nominal" level
bigip_provision:
server: lb.mydomain.com
module: pem
level: nominal
password: secret
user: admin
validate_certs: no
provider:
server: lb.mydomain.com
password: secret
user: admin
delegate_to: localhost
- name: Provision a dedicated SWG. This will unprovision every other module
bigip_provision:
server: lb.mydomain.com
module: swg
password: secret
level: dedicated
user: admin
validate_certs: no
provider:
server: lb.mydomain.com
password: secret
user: admin
delegate_to: localhost
'''

@ -67,7 +67,6 @@ EXAMPLES = r'''
password: secret
server: lb.mydomain.com
user: admin
validate_certs: no
delegate_to: localhost
- name: Add a remote syslog server on a non-standard port to log to
@ -78,7 +77,6 @@ EXAMPLES = r'''
password: secret
server: lb.mydomain.com
user: admin
validate_certs: no
delegate_to: localhost
'''

@ -102,22 +102,24 @@ EXAMPLES = r'''
bigip_routedomain:
name: foo
id: 1234
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Set VLANs on the route domain
bigip_routedomain:
name: bar
password: secret
server: lb.mydomain.com
state: present
user: admin
vlans:
- net1
- foo
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
'''

@ -90,97 +90,97 @@ EXAMPLES = r'''
address: 10.10.10.10
name: self1
netmask: 255.255.255.0
password: secret
server: lb.mydomain.com
user: admin
validate_certs: no
vlan: vlan1
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Create Self IP with a Route Domain
bigip_selfip:
server: lb.mydomain.com
user: admin
password: secret
validate_certs: no
name: self1
address: 10.10.10.10
netmask: 255.255.255.0
vlan: vlan1
route_domain: 10
allow_service: default
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Delete Self IP
bigip_selfip:
name: self1
password: secret
server: lb.mydomain.com
state: absent
user: admin
validate_certs: no
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Allow management web UI to be accessed on this Self IP
bigip_selfip:
name: self1
password: secret
server: lb.mydomain.com
state: absent
user: admin
validate_certs: no
allow_service:
- tcp:443
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Allow HTTPS and SSH access to this Self IP
bigip_selfip:
name: self1
password: secret
server: lb.mydomain.com
state: absent
user: admin
validate_certs: no
allow_service:
- tcp:443
- tcp:22
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Allow all services access to this Self IP
bigip_selfip:
name: self1
password: secret
server: lb.mydomain.com
state: absent
user: admin
validate_certs: no
allow_service:
- all
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Allow only GRE and IGMP protocols access to this Self IP
bigip_selfip:
name: self1
password: secret
server: lb.mydomain.com
state: absent
user: admin
validate_certs: no
allow_service:
- gre:0
- igmp:0
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Allow all TCP, but no other protocols access to this Self IP
bigip_selfip:
name: self1
password: secret
server: lb.mydomain.com
state: absent
user: admin
validate_certs: no
allow_service:
- tcp:0
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
'''

@ -61,10 +61,11 @@ EXAMPLES = r'''
port_misuse_policy: misuse1
timer_policy_enabled: yes
port_misuse_policy_enabled: yes
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -105,10 +105,11 @@ EXAMPLES = r'''
smtp_server_password: mail-secret
local_host_name: smtp.mydomain.com
from_address: no-reply@mydomain.com
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -50,33 +50,36 @@ author:
EXAMPLES = r'''
- name: Add the SNAT pool 'my-snat-pool'
bigip_snat_pool:
server: lb.mydomain.com
user: admin
password: secret
name: my-snat-pool
state: present
members:
- 10.10.10.10
- 20.20.20.20
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Change the SNAT pool's members to a single member
bigip_snat_pool:
server: lb.mydomain.com
user: admin
password: secret
name: my-snat-pool
state: present
member: 30.30.30.30
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Remove the SNAT pool 'my-snat-pool'
bigip_snat_pool:
server: lb.mydomain.com
user: admin
password: secret
name: johnd
state: absent
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -71,19 +71,19 @@ EXAMPLES = r'''
- name: Set snmp contact
bigip_snmp:
contact: Joe User
password: secret
server: lb.mydomain.com
user: admin
validate_certs: false
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Set snmp location
bigip_snmp:
location: US West 1
password: secret
server: lb.mydomain.com
user: admin
validate_certs: no
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
'''

@ -85,9 +85,10 @@ EXAMPLES = r'''
network: management
port: 9000
snmp_version: 1
server: lb.mydomain.com
user: admin
password: secret
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Create snmp v2 trap
@ -98,9 +99,10 @@ EXAMPLES = r'''
network: default
port: 7000
snmp_version: 2c
server: lb.mydomain.com
user: admin
password: secret
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -69,30 +69,33 @@ EXAMPLES = r'''
- name: Use a file lookup to import PEM Certificate
bigip_ssl_certificate:
name: certificate-name
server: lb.mydomain.com
user: admin
password: secret
state: present
content: "{{ lookup('file', '/path/to/cert.crt') }}"
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Use a file lookup to import CA certificate chain
bigip_ssl_certificate:
name: ca-chain-name
server: lb.mydomain.com
user: admin
password: secret
state: present
content: "{{ lookup('file', '/path/to/ca-chain.crt') }}"
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Delete Certificate
bigip_ssl_certificate:
name: certificate-name
server: lb.mydomain.com
user: admin
password: secret
state: absent
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -67,20 +67,22 @@ EXAMPLES = r'''
- name: Use a file lookup to import key
bigip_ssl_key:
name: key-name
server: lb.mydomain.com
user: admin
password: secret
state: present
content: "{{ lookup('file', '/path/to/key.key') }}"
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Delete key
bigip_ssl_key:
name: key-name
server: lb.mydomain.com
user: admin
password: secret
state: absent
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -48,29 +48,32 @@ author:
EXAMPLES = r'''
- name: Set the boot.quiet DB variable on the BIG-IP
bigip_sys_db:
user: admin
password: secret
server: lb.mydomain.com
key: boot.quiet
value: disable
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Disable the initial setup screen
bigip_sys_db:
user: admin
password: secret
server: lb.mydomain.com
key: setup.run
value: false
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Reset the initial setup screen
bigip_sys_db:
user: admin
password: secret
server: lb.mydomain.com
key: setup.run
state: reset
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -116,20 +116,22 @@ EXAMPLES = r'''
idle_timeout: 200
destination_ports:
- 21
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
- name: Remove a timer policy and all its associated rules
bigip_timer_policy:
name: timer1
description: My timer policy
password: secret
server: lb.mydomain.com
state: absent
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -58,10 +58,11 @@ EXAMPLES = r'''
- name: Create a traffic group
bigip_traffic_group:
name: foo
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -105,60 +105,66 @@ author:
EXAMPLES = r'''
- name: Upload UCS
bigip_ucs:
server: lb.mydomain.com
user: admin
password: secret
ucs: /root/bigip.localhost.localdomain.ucs
state: present
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Install (upload, install) UCS.
bigip_ucs:
server: lb.mydomain.com
user: admin
password: secret
ucs: /root/bigip.localhost.localdomain.ucs
state: installed
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Install (upload, install) UCS without installing the license portion
bigip_ucs:
server: lb.mydomain.com
user: admin
password: secret
ucs: /root/bigip.localhost.localdomain.ucs
state: installed
no_license: yes
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Install (upload, install) UCS except the license, and bypassing the platform check
bigip_ucs:
server: lb.mydomain.com
user: admin
password: secret
ucs: /root/bigip.localhost.localdomain.ucs
state: installed
no_license: yes
no_platform_check: yes
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Install (upload, install) UCS using a passphrase necessary to load the UCS
bigip_ucs:
server: lb.mydomain.com
user: admin
password: secret
ucs: /root/bigip.localhost.localdomain.ucs
state: installed
passphrase: MyPassphrase1234
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Remove uploaded UCS file
bigip_ucs:
server: lb.mydomain.com
user: admin
password: secret
ucs: bigip.localhost.localdomain.ucs
state: absent
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -75,11 +75,12 @@ author:
EXAMPLES = r'''
- name: Download a new UCS
bigip_ucs_fetch:
server: lb.mydomain.com
user: admin
password: secret
src: cs_backup.ucs
dest: /tmp/cs_backup.ucs
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
'''

@ -197,22 +197,24 @@ author:
EXAMPLES = r'''
- name: Add virtual address
bigip_virtual_address:
server: lb.mydomain.net
user: admin
password: secret
state: present
partition: Common
address: 10.10.10.10
provider:
server: lb.mydomain.net
user: admin
password: secret
delegate_to: localhost
- name: Enable route advertisement on the virtual address
bigip_virtual_address:
server: lb.mydomain.net
user: admin
password: secret
state: present
address: 10.10.10.10
use_route_advertisement: yes
provider:
server: lb.mydomain.net
user: admin
password: secret
delegate_to: localhost
'''

@ -83,10 +83,11 @@ EXAMPLES = r'''
managed: no
device_username: admin
device_password: secret
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Register a managed device, by name
@ -95,10 +96,11 @@ EXAMPLES = r'''
key: XXXX-XXXX-XXXX-XXXX-XXXX
device: bigi1.foo.com
managed: yes
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Register a managed device, by UUID
@ -107,10 +109,11 @@ EXAMPLES = r'''
key: XXXX-XXXX-XXXX-XXXX-XXXX
device: 7141a063-7cf8-423f-9829-9d40599fa3e0
managed: yes
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -54,10 +54,11 @@ EXAMPLES = r'''
- name: Create a registration key (regkey) pool to hold individual device licenses
bigiq_regkey_pool:
name: foo-pool
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

@ -54,19 +54,21 @@ EXAMPLES = r'''
bigiq_utility_license:
license_key: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
accept_eula: yes
password: secret
server: lb.mydomain.com
state: present
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
- name: Remove a utility license from the system
bigiq_utility_license:
license_key: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
password: secret
server: lb.mydomain.com
state: absent
user: admin
provider:
user: admin
password: secret
server: lb.mydomain.com
delegate_to: localhost
'''

Loading…
Cancel
Save