bigip_config – Manage BIG-IP configuration sections

New in version 1.0.0.

Synopsis

  • Manages a BIG-IP configuration. Allows for merge of SCF formatted files into the running configuration.

Parameters

Parameter Choices/Defaults Configuration Comments
merge_content
path
The file that contains desired configuration to be merged.
Loads the specified configuration from a file to merge into the running configuration.
reset
boolean
    Choices:
  • no ←
  • yes
Loads the default configuration on the device.
If this option is specified, the default configuration is loaded.
On TMOS v14.0.0 and up, resetting to the default configuration resets the admin and user password to the defaults. Restarts services, which leads to 503 server errors followed by 401 authorization errors during module execution. We recommend changing the ansible_httpapi_password before checking for the reset task state.
save
boolean
    Choices:
  • no ←
  • yes
The save argument instructs the module to save the running-config to startup-config.
task_id
string
The ID of the async task as returned by the system in a previous module run.
Used to query the status of the task on the device.
When this parameter is set, all other module parameters are ignored.
timeout
integer
Default:
150
The amount of time to wait for the DO async interface to complete its task, in seconds.
The accepted value range is between 150 and 3600 seconds.
verify
boolean
    Choices:
  • no ←
  • yes
Validates the specified configuration to see whether it is valid to replace the running configuration.
The running configuration will not be changed.
When this parameter is set to yes, no change is reported by the module.
Verifies the operation is synchronous and does not require checking for task completion.

Examples

- hosts: all
  collections:
    - f5networks.f5_bigip
  connection: httpapi

  vars:
    ansible_host: "lb.mydomain.com"
    ansible_user: "admin"
    ansible_httpapi_password: "secret"
    ansible_network_os: f5networks.f5_bigip.bigip
    ansible_httpapi_use_ssl: yes

  tasks:
    - name: Save the running configuration of the BIG-IP
      bigip_config:
        save: yes
      register: task

    - name: Check for task completion
      bigip_config:
        task_id: "{{ task.task_id }}"
        timeout: 150

    - name: Reset the BIG-IP configuration, for example, to RMA the device
      bigip_config:
        reset: yes
      register: task

    - name: Change connection password after config was reset
      set_fact:
        ansible_httpapi_password: "default"

    - name: Check for reset task completion
      bigip_config:
        task_id: "{{ task.task_id }}"
        timeout: 150

    - name: Save the running configuration of the BIG-IP after reset
      bigip_config:
        save: yes
      register: task

    - name: Check for save config task completion after reset
      bigip_config:
        task_id: "{{ task.task_id }}"
        timeout: 150

    - name: Load an SCF configuration
      bigip_config:
        merge_content: "{{ role_path }}/files/config.scf') }}"
      register: task

    - name: Check for merge config task completion
      bigip_config:
        task_id: "{{ task.task_id }}"
        timeout: 150

    - name: Verify an SCF configuration merge validity
      bigip_config:
        merge_content: "{{ role_path }}/files/config.scf') }}"
        validate: true

Return Values

The following are the fields unique to this module:

Key Returned Description
message
dictionary
always
Informative message.

Sample:
Verification is successful
task_id
dictionary
changed
The task ID returned by the system.

Sample:
hash/dictionary of values


Status

Authors

  • Wojciech Wypior (@wojtek0806)