Skip to content

Instantly share code, notes, and snippets.

@wanlebing
Forked from ahill00/Upgrade Open vSwitch
Created December 11, 2017 02:47
Show Gist options
  • Save wanlebing/2c41b1ef702b4cde6e0b6718ab58c485 to your computer and use it in GitHub Desktop.
Save wanlebing/2c41b1ef702b4cde6e0b6718ab58c485 to your computer and use it in GitHub Desktop.
# From @andyhky (http://virtualandy.wordpress.com)
# Upgrading OVS is discussed at length here: http://wp.me/pp5B3-aZ
---
- name: Upgrade OVS
hosts: "*"
gather_facts: false
connection: ssh
user: root
tasks:
- name: Get OpenVswitch Version
command: /etc/init.d/openvswitch version
register: vswitch_version
- name: Get your RPMs
command: rpm -Uvh http://path.to/ovs.rpm http://path.to/ovs-module.rpm
when: vswitch_version.stdout.find('{{ ovs_version }}') == -1
- name: touch a needs Kmod reload file
command: touch /tmp/.needsKmodReload
- name: Reload OVS kernel module (IMPACTING)
command: /etc/init.d/openvswitch force-reload-kmod
removes=/tmp/.needsKmodReload
async: 300
poll: 20
when: vswitch_version.stdout.find('{{ ovs_version }}') == -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment