So I’ve been working for a company called Avi Networks for a while now. Working on customer deployments, internal devops automation, customer migrations, and tons of other projects including getting Avi to have the largest module library available out of any load balancer on the market. Well, today were going to show how to use Avi’s Ansible modules to patch your Avi Controller. It’s easy, here’s how.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
--- - name: Patch Controller | Upload package on controller avi_api_fileservice: avi_credentials: "{{ avi_credentials }}" upload: true timeout: 300 path: /patch_pkgs/ file_path: "{{ patch_path }}" - name: Patch Controller | Upgrade controller avi_api_session: avi_credentials: "{{ avi_credentials }}" http_method: post timeout: 300 path: cluster/upgrade/ data: image_path: controller://upgrade_pkgs/{{ patch_path|basename }} force: true disruptive: true patch: true - name: Patch Controller | Wait for the Controller Upgrade to finish avi_api_session: avi_credentials: "{{ avi_credentials }}" http_method: get timeout: 300 path: cluster/upgrade/status register: upgrade_status until: upgrade_status.obj.result == "SUCCESS" retries: 120 delay: 10 |
This will also wait for the controller to come back up 🙂