Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# 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