Git Product home page Git Product logo

ansible-f5-upload-install-os's Introduction

ansible-f5-upload-install-os

I was asked to upgarde 40+ f5 devices in AWS, so i thought it would be best to automate the entire procoess using a simple ansible playbook.

  • Inventory list of all the f5s i needed to upgrade (active and standby) for the environment.
ansible-playbook -i inventory/hosts install-os.yaml
mount -o remount,ro /usr

install-os.yaml

The playbook perfoms the following actions:

  • saves the existing configurations
  • uploads the latest OS
  • installs it on a new partition
  • copies the exiting configuration to the new parition and reboots the device
  • prints out an output of when its complete

Note:

  • I tried to use the bigip_command to execute the cpcfg command but it only works for TMSH commands not CLI/BASH commands.
  • if you dont want the device to boot just remove the following.
    - name: Copy the config from HD1.1 to HD1.2 cpcfg --source=HD1.1 --reboot HD1.2    
      raw: curl -u "{{ansible_user}}":"{{ansible_ssh_pass}}" -k https://"{{ansible_host}}":8443/mgmt/tm/util/bash  -H "Content-type:application/json" -d "{\"command\":\"run\",\"utilCmdArgs\":\"-c 'cpcfg --source=HD1.1 --reboot HD1.2'\"}"
      ignore_errors: True
      register: cpcfg

How to use the playbook.

I am sure i will continue to edit this to make it better and learn as I go.. for F5 VEs and physical devices this is the cpfcg command

cpcfg --source=HD1.1 --reboot HD1.3

On a VIPRION system, ensure each blade receives the updated configuration by running the cpcfg command with the clsh utility on the primary blade.

For example:

clsh cpcfg --source=HD1.1 --reboot HD1.3

** Tested in VMware vsphere 6.7 = all good! ** Tested in AWS ** Tested in GCP ** Tested in Azure

ansible-f5-upload-install-os's People

Contributors

sebbycorp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.