diff --git a/strategy/artifacting.py b/strategy/artifacting.py new file mode 100644 index 0000000..9d36bda --- /dev/null +++ b/strategy/artifacting.py @@ -0,0 +1,35 @@ +# Copyright 2017, Rackspace US, Inc. +# +# 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. +# + +import os + +import linear + + +class StrategyModule(linear.StrategyModule): + def _queue_task(self, host, task, task_vars, play_context): + """Wipe the notification system and return for config tasks.""" + task.notify = None + skip_tags = os.environ.get('OS_ANSIBLE_SKIP_TAGS', 'config') + skip_tags = skip_tags.split(',') + if any([True for i in skip_tags if i in task.tags]): + return + else: + return super(StrategyModule, self)._queue_task( + host, + task, + task_vars, + play_context + )