Skip to content

Instantly share code, notes, and snippets.

@ahill00
Created April 4, 2014 21:23
Show Gist options
  • Save ahill00/9983421 to your computer and use it in GitHub Desktop.
Save ahill00/9983421 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