Pre/Post upgrade command hooks

This commit adds logic for an individual command to be executed
before and after the upgade process for additional scripts or
processes that may be required. Also fix a line wrap for improved
readability of .rst in plain text mode.

Change-Id: Ica50d23754a334bc698c5112d2a4e683f02e97cd
This commit is contained in:
Julia Kreger
2014-10-03 23:44:03 -04:00
committed by Julia Kreger
parent fd55c50fe9
commit 8637773eb5
4 changed files with 60 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: "Execute LOCAL command on this node"
hosts: localhost
sudo: yes
max_fail_percentage: 0
tasks:
- name: "Execute Locally defined command"
command: "{{ post_hook_command }}"
delegate_to: 127.0.0.1
when: post_hook_command is defined