Forum Discussion

Alic_Antunez's avatar
Alic_Antunez
Icon for Nimbostratus rankNimbostratus
Jul 16, 2021

it is possible to change credentials on several devices at the same time using automation tool?

Hi friends

 

Where I work we manage more than 200 F5 BIG-IP equipment (hardware). Once every two months, for internal reasons, we have to renew the credentials (username/password) of all the devices, one by one. As you might know, this is a repetitive and time-consuming task. My question is. Is there any way using automation perhaps, to set up the credentials to all devices at once? Maybe using technologies like Python, Ansible, or any other automation tool. 

Thank you in advance

1 Reply

  • Hi Alic

    It is possible using Ansible or Python.

    If you don't know Python, it might be quicker to do it using Ansible.

    In Ansible, you define an inventory where you can add all of your 200 F5 BIG-IP hosts like this (replace bigip1 for the hostname that your bigips are reachable):

    # inventory
    bigip1
    bigip2
    bigip3
    .
    .
    bigip200

    Then you build your playbook with the single task of changing the password of all 200 BIG IPS (playbook.yaml file):

    ---
    - hosts: all
      tasks:
      - name: Change the Admin password
        bigip_user:
          state: present
          username_credential: admin
          password_credential: <type your new password here>
          provider:
            server: "{{ inventory_hostname }}"
            user: admin
            password: <type your current password here>

    Note: the inventory_hostname variable above will pick up the hostname you're connecting to from the inventory you defined.

    Lastly you execute "ansible-playbook" command:

    ansible-playbook -i inventory playbook.yaml

    Hope it helps.

    Cheers.