openstack-ansible-os_swift/tasks/swift_init_common.yml
Jimmy McCrory acdbf6bc38 Filter services dictionary per host
To greatly reduce the amount of log noise from skipped tasks, set a
var in the role that filters the 'swift_services' dict to one that only
contains services relevant for each host.

Change-Id: Ib4e7d398ce2b34e560520d0266dc67bed653cc5c
2017-04-26 17:11:48 +00:00

28 lines
858 B
YAML

---
# Copyright 2014, 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.
- include: swift_init_systemd.yml
static: no
when:
- ansible_service_mgr == 'systemd'
- name: Load service
service:
name: "{{ item.value.program_name }}"
enabled: "yes"
with_dict: "{{ filtered_swift_services }}"
notify:
- Restart swift services