37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
---
|
|
# Copyright 2015, 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: Playbook for role testing
|
|
hosts: localhost
|
|
connection: local
|
|
roles:
|
|
- role: "{{ rolename | basename }}"
|
|
post_tasks:
|
|
- name: check rsyslog is running
|
|
shell: ps auxf | grep -v grep | grep rsyslog
|
|
- name: Open rsyslog.conf
|
|
slurp:
|
|
src: "/etc/rsyslog.conf"
|
|
register: rsyslog_conf
|
|
- name: Check os_aggregate_storage exists
|
|
stat:
|
|
path: /etc/logrotate.d/os_aggregate_storage
|
|
register: os_aggregate_storage
|
|
- name: Check role functions
|
|
assert:
|
|
that:
|
|
- "'template(name=\"DDF' in (rsyslog_conf.content | b64decode)"
|
|
- "os_aggregate_storage.stat.exists"
|