2014-08-26 18:08:15 -05:00

39 lines
1.3 KiB
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.
- name: Create directories for each host
file:
name: "{{ serverspec_install_dir }}/spec/{{ ansible_ssh_host }}"
state: directory
with_items: groups['utility_all']
delegate_to: "{{ item }}"
- name: Create all role checks for each host
template:
src: "all_spec.rb.j2"
dest: "{{ serverspec_install_dir }}/spec/{{ ansible_ssh_host }}/all_spec.rb"
with_items: groups['utility_all']
delegate_to: "{{ item }}"
- name: Create appropriate role checks for each host
template:
src: "{{ item[1] }}_spec.rb.j2"
dest: "{{ serverspec_install_dir }}/spec/{{ ansible_ssh_host }}/{{ item[1] }}_spec.rb"
with_nested:
- groups['utility_all']
- openstack_service_types
when: item[1] in group_names
delegate_to: "{{ item[0] }}"