tripleo-ansible/tripleo_ansible/ansible_plugins/tests/molecule/tripleo_strategies/converge.yml

60 lines
2.3 KiB
YAML

---
# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# 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: Run strategy tests
hosts: localhost
connection: local
gather_facts: false
environment:
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH:-/usr/share/ansible/roles}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"
ANSIBLE_STRATEGY_PLUGINS: "${ANSIBLE_STRATEGY_PLUGINS:-/usr/share/ansible/plugins/strategy}"
tasks:
- name: Run TripleO linear success
shell: |-
. {{ playbook_dir }}/ansible-test-env.rc
ansible-playbook {{ playbook_dir }}/tripleo-linear.yml -i {{ playbook_dir }}/inventory-success | grep "second"
args:
executable: /bin/bash
register: linear_success
- name: Run TripleO linear fail
shell: |-
. {{ playbook_dir }}/ansible-test-env.rc
ansible-playbook {{ playbook_dir }}/tripleo-linear.yml -i {{ playbook_dir }}/inventory-fail | grep "second"
args:
executable: /bin/bash
register: linear_fail
failed_when: linear_fail.rc == 0
- name: Run TripleO free success
shell: |-
. {{ playbook_dir }}/ansible-test-env.rc
ansible-playbook {{ playbook_dir }}/tripleo-free.yml -i {{ playbook_dir }}/inventory-success | grep "second"
args:
executable: /bin/bash
register: free_success
- name: Run TripleO free fail
shell: |-
. {{ playbook_dir }}/ansible-test-env.rc
ansible-playbook {{ playbook_dir }}/tripleo-free.yml -i {{ playbook_dir }}/inventory-fail | grep "second"
args:
executable: /bin/bash
register: free_fail
failed_when: free_fail.rc == 0