Forum Discussion

Greg_Jewett's avatar
May 21, 2024

Force peer to standby using Ansible!?

So, I have read over a number of articles found online regarding determining which nodes are active and attempt to perform the "force to standby" action, thus, in turn, causes the HA peer to become active.  (Same as clicking on the button by the same name in the GUI).

So, I have successfully generated a variable that contains the node that needs to sent to standby.  That part works thus far.

However, when I then go to use "f5networks.f5_modules.bigip_node" ansible module to perform the failover, it tells me that the task resulted in a "change", but the node does not go offline and its peer does not become active.

- name: Force the failover of the B unit peer...
    state: offline
    fqdn: "{{ }}"
    name: "{{ }}"
      server: "{{ }}"
      server_port: 443
      validate_certs: false
      no_f5_teem: false
      user: admin
      password: "{{ admin_acct_password }}"
  delegate_to: localhost


TASK [debug] **********************************************************************
ok: [] => {
    "host_to_failover": {
        "name": "",
        "state": "active"

TASK [Force the failover of the B unit peer...] ***************************************
changed: []

Some confusion about parameters:
See:  ansible module > bigip_node

It requires a "name" parameter, even though I am not adding a "node", so I just populate it with the hostname I was to "force to standby".   It also asks for It asks for an fqdn/address.   I guess this is the node I want to perform the "force to standby" on?  So I also populate that with the hostname I was to "force to standby".

There is also the "server" within the "provider", and does that have any affect on requesting this action?  I tried putting the node to failover here, as well as its peer, but it does not make any difference.

Nothing I do, actually causes a "failover" to the "A peer" from the "B peer".  


What is the best way (example please?) to "force to standby" a node, to cause a failover, and the HA peer to become the active peer?