diff options
author | Joel Diaz <jdiaz@redhat.com> | 2016-01-06 09:27:32 -0500 |
---|---|---|
committer | Joel Diaz <jdiaz@redhat.com> | 2016-01-06 09:27:32 -0500 |
commit | 4834968bd9b3bc621ecfc7584c0bc776471475f6 (patch) | |
tree | 53dd150be51ef5e8d6f492d489070e68d88ba408 /playbooks/adhoc/sdn_restart | |
parent | d5622630364bd541785bc3ad08bb675d0b7b562e (diff) | |
parent | f2f98cafd873dc8bb46d24631d043ddfc92812de (diff) | |
download | openshift-4834968bd9b3bc621ecfc7584c0bc776471475f6.tar.gz openshift-4834968bd9b3bc621ecfc7584c0bc776471475f6.tar.bz2 openshift-4834968bd9b3bc621ecfc7584c0bc776471475f6.tar.xz openshift-4834968bd9b3bc621ecfc7584c0bc776471475f6.zip |
Merge pull request #1120 from joelddiaz/sdn-reset
playbook for restarting SDN
Diffstat (limited to 'playbooks/adhoc/sdn_restart')
-rwxr-xr-x | playbooks/adhoc/sdn_restart/oo-sdn-restart.yml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/playbooks/adhoc/sdn_restart/oo-sdn-restart.yml b/playbooks/adhoc/sdn_restart/oo-sdn-restart.yml new file mode 100755 index 000000000..0dc021fbc --- /dev/null +++ b/playbooks/adhoc/sdn_restart/oo-sdn-restart.yml @@ -0,0 +1,53 @@ +#!/usr/bin/ansible-playbook +--- +#example run: +# ansible-playbook -e "host=ops-node-compute-abcde" oo-sdn-restart.yml +# + +- name: Check vars + hosts: localhost + gather_facts: false + + pre_tasks: + - fail: + msg: "Playbook requires host to be set" + when: host is not defined or host == '' + +- name: Restart openshift/docker (and monitoring containers) + hosts: oo_version_3:&oo_name_{{ host }} + gather_facts: false + user: root + + tasks: + - name: stop openshift/docker + service: + name: "{{ item }}" + state: stopped + with_items: + - atomic-openshift-node + - docker + + - name: restart openvswitch + service: + name: openvswitch + state: restarted + + - name: wait 5 sec + pause: + seconds: 5 + + - name: start openshift/docker + service: + name: "{{ item }}" + state: started + with_items: + - atomic-openshift-node + - docker + + - name: start monitoring containers + service: + name: "{{ item }}" + state: restarted + with_items: + - oso-f22-host-monitoring + - oso-rhel7-zagg-client |